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()