Skip to content

Commit

Permalink
nevermind
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxghost committed Sep 22, 2017
1 parent 755aa07 commit 1648096
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]')

Expand Down

0 comments on commit 1648096

Please sign in to comment.