Fix connect hooks

Apparently having multiple hooks on the same thing is just horribly
broken, even though we do it in other places. This only fixes the issue
on connecting as that one is the most severe, but the other cases will
need to be fixed as well (or the underlying issue preventing it from
working needs to be fixed).
This commit is contained in:
skizzerz 2015-07-29 03:14:10 -05:00
parent dbb80a940e
commit e27fd8c1fa

View File

@ -101,8 +101,6 @@ def unhandled(cli, prefix, cmd, *args):
notify_error(cli, botconfig.CHANNEL, log) notify_error(cli, botconfig.CHANNEL, log)
def connect_callback(cli): def connect_callback(cli):
@hook("endofmotd", hookid=294)
@hook("nomotd", hookid=294)
def prepare_stuff(cli, *args): def prepare_stuff(cli, *args):
# just in case we haven't managed to successfully auth yet # just in case we haven't managed to successfully auth yet
if not botconfig.SASL_AUTHENTICATION: if not botconfig.SASL_AUTHENTICATION:
@ -128,6 +126,9 @@ def connect_callback(cli):
wolfgame.connect_callback(cli) wolfgame.connect_callback(cli)
hook("endofmotd", hookid=294)(prepare_stuff)
hook("nomotd", hookid=294)(prepare_stuff)
def mustregain(cli, *blah): def mustregain(cli, *blah):
if not botconfig.PASS: if not botconfig.PASS:
return return