mirror of
https://github.com/SantaSpeen/Rcon-VK-Bot.git
synced 2026-10-27 06:20:06 +00:00
del fix_rcon_text
This commit is contained in:
1 parent
49ccb76933
commit
ee70027d31
1 file changed
+2
-10
+2
-10
@@ -72,19 +72,11 @@ class Permissions:
|
|||||||
perms = Permissions(config['permission_file'])
|
perms = Permissions(config['permission_file'])
|
||||||
|
|
||||||
|
|
||||||
def fix_rcon_text(_srt):
|
|
||||||
try:
|
|
||||||
_srt = re.sub(r'§.', '', _srt)
|
|
||||||
except Exception as e:
|
|
||||||
log(f"fix_rcon_text ERROR with: {_srt}", 1)
|
|
||||||
_srt = f'CRITICAL ERROR: {e}'
|
|
||||||
return _srt
|
|
||||||
|
|
||||||
|
|
||||||
def rcon(cmd):
|
def rcon(cmd):
|
||||||
try:
|
try:
|
||||||
with MCRcon(host, password, port) as mcr:
|
with MCRcon(host, password, port) as mcr:
|
||||||
return fix_rcon_text(mcr.command(cmd))
|
text = mcr.command(cmd)
|
||||||
|
return re.sub(r'§.', '', text)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log(f"RCON ERROR with command: {cmd}", 1)
|
log(f"RCON ERROR with command: {cmd}", 1)
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
|||||||
Reference in new issue
Block a user