diff --git a/bot.py b/bot.py index 22ac040..bde499e 100644 --- a/bot.py +++ b/bot.py @@ -13,16 +13,8 @@ logging.basicConfig(stream=sys.stdout, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) pattern_2fa = re.compile(r'^\s*!?2[fF][aA]( +.+)?\s*$') -pattern_sa = re.compile(r'^<(.+)>', re.M) -pattern_all = re.compile(r'@all\b') def asf_ipc(command): - command_all = pattern_all.search(command) - if command_all: - ret = list() - for player in get_players(): - ret.append(asf_ipc(command.replace('@all', player))) - return ''.join(ret).replace('\n\n', '\n') ipc_url = ipc + parse.quote(command) req = request.Request(ipc_url) try: @@ -35,11 +27,6 @@ def asf_ipc(command): res = res_data.read().decode("utf-8") return res -def get_players(): - msg = asf_ipc('sa') - players = pattern_sa.findall(msg) - return players - def mfa_timeout(bot, job): bot.editMessageText(chat_id=job.context[0], message_id=job.context[1], text='[2FA Deleted]')