From 1de23dafb857fc6125f37c1ece7ceac3b898ebc0 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Thu, 16 Apr 2015 16:07:45 +0200 Subject: [PATCH] Unhook the initial WHO hooks after processing them This fixes an issue where calling !ping or !admins would disable accounts, because they unconditionally send a normal WHO request. --- src/wolfgame.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wolfgame.py b/src/wolfgame.py index 875c458..ce1ca1e 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -218,6 +218,9 @@ def connect_callback(cli): cli.msg(botconfig.CHANNEL, "PING! {0}".format(players)) c.execute("UPDATE pre_restart_state SET players = NULL") + # Unhook the WHO hooks + decorators.unhook(HOOKS, 295) + #bot can be tricked into thinking it's still opped by doing multiple modes at once @hook("mode", hookid=296)