diff --git a/decorators.py b/decorators.py index 08c6e79..9298304 100644 --- a/decorators.py +++ b/decorators.py @@ -18,11 +18,11 @@ def generate(fdict, permissions=True, **kwargs): def dec(f): def innerf(*args): largs = list(args) - if largs[1]: + if len(largs) > 1 and largs[1]: cloak = parse_nick(largs[1])[3] else: cloak = "" - if not raw_nick and largs[1]: + if not raw_nick and len(largs) > 1 and largs[1]: largs[1] = parse_nick(largs[1])[0] # username #if largs[1].startswith("#"): if not permissions or "" in s: diff --git a/wolfgame.py b/wolfgame.py index 92195bd..9c24127 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -64,14 +64,14 @@ def connect_callback(cli): cli.nick(botconfig.NICK+"_") cli.ns_ghost() cli.nick(botconfig.NICK) - prepare_stuff() + prepare_stuff(cli) @hook("unavailresource") def mustrelease(cli, *blah): cli.nick(botconfig.NICK+"_") cli.ns_release() cli.nick(botconfig.NICK) - prepare_stuff() + prepare_stuff(cli) var.LAST_PING = None # time of last ping var.LAST_STATS = None