From 8d09e8aea8f5d991a31f25a30351e747e402d5d2 Mon Sep 17 00:00:00 2001 From: Santa Date: Tue, 28 Mar 2023 20:28:49 +0300 Subject: [PATCH] .idea --- .idea/.gitignore | 3 ++ .idea/Rcon-VK-Bot.iml | 8 ++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/misc.xml | 4 +++ .idea/modules.xml | 8 ++++++ .idea/vcs.xml | 6 ++++ main.py | 28 +++++++++++++++++++ 7 files changed, 63 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/Rcon-VK-Bot.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 main.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Rcon-VK-Bot.iml b/.idea/Rcon-VK-Bot.iml new file mode 100644 index 0000000..8437fe6 --- /dev/null +++ b/.idea/Rcon-VK-Bot.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dc9ea49 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..001a9c7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..a72a12b --- /dev/null +++ b/main.py @@ -0,0 +1,28 @@ +from mcrcon import MCRcon + + + +def fix_rcon_text(_srt): + try: + _srt = list(_srt) + for i in range(len(_srt)): + if _srt[i] == 'ยง': + _srt[i] = '' + _srt[i + 1] = '' + _srt = ''.join(_srt) + except Exception as e: + _srt = f'CRITICAL ERROR: {e}' + return _srt + + +def rcon(cmd): + with MCRcon(host, password, port) as mcr: + return fix_rcon_text(mcr.command(cmd)) + + +def main(): + pass + + +if __name__ == '__main__': + main()