mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-17 16:25:36 +00:00
Fix lua colors
This commit is contained in:
parent
336aa31732
commit
e348ffecc3
@ -3,6 +3,7 @@ import json
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import re
|
||||
import shutil
|
||||
import threading
|
||||
import time
|
||||
@ -65,7 +66,8 @@ class MP:
|
||||
for i, arg in enumerate(args):
|
||||
if isinstance(arg, str):
|
||||
try:
|
||||
args[i] = arg.encode("CP1251").decode(config.enc)
|
||||
text = arg.encode("CP1251").decode(config.enc).replace("\u001b", "\x1b")
|
||||
args[i] = re.sub(r'\x1b\[.*?m', '', text)
|
||||
except UnicodeEncodeError:
|
||||
pass
|
||||
if "LuaTable" in str(type(arg)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user