Fix for callers, and auto-clear them if there's no inactivity for 60 minutes
This commit is contained in:
@@ -84,26 +84,30 @@ class DingController:
|
||||
# AXP 30
|
||||
if packet.id == 36:
|
||||
info = re.findall(self.axp, packet.message)
|
||||
if info:
|
||||
user = self.get_user(info[0])
|
||||
if user:
|
||||
self.bot.send_mass_message(user.char_id,
|
||||
f"<green>Game Over</green>! "
|
||||
f"{random.choice(self.text_options_axp).format(**user)} "
|
||||
f"<yellow>[{self.generate_output('AI 30')}]</yellow>",
|
||||
log_message=True)
|
||||
if not info:
|
||||
return
|
||||
user = self.get_user(info[0])
|
||||
if not user:
|
||||
return
|
||||
self.bot.send_mass_message(user.char_id,
|
||||
f"<green>Game Over</green>! "
|
||||
f"{random.choice(self.text_options_axp).format(**user)} "
|
||||
f"<yellow>[{self.generate_output('AI 30')}]</yellow>",
|
||||
log_message=True)
|
||||
|
||||
# XP 220
|
||||
if packet.id == 35:
|
||||
info = re.findall(self.xp, packet.message)
|
||||
if info:
|
||||
user = self.get_user(info[0])
|
||||
if user:
|
||||
self.bot.send_mass_message(user.char_id,
|
||||
f"<font color=#FF1493>Game Over</font>! "
|
||||
f"{random.choice(self.text_options_xp).format(**user)} "
|
||||
f"<yellow>[{self.generate_output('Level 220')}]</yellow>",
|
||||
log_message=True)
|
||||
if not info:
|
||||
return
|
||||
user = self.get_user(info[0])
|
||||
if not user:
|
||||
return
|
||||
self.bot.send_mass_message(user.char_id,
|
||||
f"<font color=#FF1493>Game Over</font>! "
|
||||
f"{random.choice(self.text_options_xp).format(**user)} "
|
||||
f"<yellow>[{self.generate_output('Level 220')}]</yellow>",
|
||||
log_message=True)
|
||||
|
||||
def generate_output(self, level):
|
||||
invite = self.text.make_chatcmd("click here", "/tell <myname> discord invite",
|
||||
|
||||
Reference in New Issue
Block a user