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.
This commit is contained in:
nyuszika7h 2015-04-16 16:07:45 +02:00
parent 9479807852
commit 1de23dafb8

View File

@ -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)