Compare commits

..

No commits in common. "49ccb769337ec4fb5afb5f6381edbddf78b147b4" and "82869515f34f98b028e35ed0d8a0b63f266c55d0" have entirely different histories.

2 changed files with 8 additions and 4 deletions

View File

@ -7,8 +7,8 @@
* Доступные разрешённым людям
* **.rcon <*commnd*>** - Исполняет <*commnd*> и отсылает ответ сервера
* Доступные всем
* **!help** - Выводит станичку с командами (Текст в файле help_message.txt)
* **!online** - Выводит rcon cmd *list*
* **!help** - Выводит станичку с командами (строки 99-103 main.py)
* **!online** - Парсит rcon cmd *list* и выводит онлайн сервера
## Система permissions

View File

@ -1,4 +1,3 @@
import re
import sys
import json
import traceback
@ -74,7 +73,12 @@ perms = Permissions(config['permission_file'])
def fix_rcon_text(_srt):
try:
_srt = re.sub(r'§.', '', _srt)
_srt = list(_srt)
for i in range(len(_srt)):
if _srt[i] == '§':
_srt[i] = ''
_srt[i + 1] = ''
_srt = ''.join(_srt)
except Exception as e:
log(f"fix_rcon_text ERROR with: {_srt}", 1)
_srt = f'CRITICAL ERROR: {e}'