|
|
|
@ -162,15 +162,23 @@ async def message_received(nick, target, message, **kwargs):
|
|
|
|
|
|
|
|
|
|
async def handle_msg(nick, msg, target, now: float):
|
|
|
|
|
global TASK_AUTHORS, TASK_QUEUE
|
|
|
|
|
if not msg.startswith("!dall "):
|
|
|
|
|
|
|
|
|
|
def _err(target, err):
|
|
|
|
|
return bot.send("PRIVMSG", target=target, message=err)
|
|
|
|
|
|
|
|
|
|
if "!dall" not in msg:
|
|
|
|
|
return
|
|
|
|
|
msg = msg[6:].strip()
|
|
|
|
|
|
|
|
|
|
if len(msg) <= 8:
|
|
|
|
|
err = f"{nick}: longer query required."
|
|
|
|
|
bot.send("PRIVMSG", target=target, message=err)
|
|
|
|
|
spl = msg.split(' ')
|
|
|
|
|
if "!dall" not in spl[:2]:
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
msg = msg[msg.find("!dall"):]
|
|
|
|
|
msg = msg[5:].strip()
|
|
|
|
|
|
|
|
|
|
if len(msg) <= 8:
|
|
|
|
|
return _err(target, f"longer query required.")
|
|
|
|
|
|
|
|
|
|
TASK_AUTHORS.setdefault(nick, 0)
|
|
|
|
|
if TASK_AUTHORS[nick] >= 3:
|
|
|
|
|
err = f"{nick}: you already queued 3 thingies, patient!!11"
|
|
|
|
|