fixed automatic /ns ghost bug

This commit is contained in:
Jimmy Cao 2011-08-07 23:56:28 -05:00
parent 309f84a325
commit 0c418a5c2a
2 changed files with 4 additions and 4 deletions

View File

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

View File

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