Use the specified username for NickServ identify
This commit is contained in:
parent
7751efdd3c
commit
32ab792e2f
@ -272,8 +272,8 @@ class IRCClient(object):
|
||||
self.send("PART {0} :{1}".format(chan, msg))
|
||||
def kick(self, chan, nick, msg=""):
|
||||
self.send("KICK", chan, nick, ":"+msg)
|
||||
def ns_identify(self, passwd, nickserv, command):
|
||||
self.msg(nickserv, command.format(account=self.nickname, password=passwd))
|
||||
def ns_identify(self, account, passwd, nickserv, command):
|
||||
self.msg(nickserv, command.format(account=self.account, password=passwd))
|
||||
def ns_ghost(self, nickserv, command):
|
||||
if command:
|
||||
self.msg(nickserv, command.format(nick=self.nickname))
|
||||
@ -289,5 +289,5 @@ class IRCClient(object):
|
||||
conn = self.connect()
|
||||
while True:
|
||||
if not next(conn):
|
||||
self.stream_handler("Calling sys.exit()...", level="warning")
|
||||
self.stream_handler("Calling sys.exit()... {0}".format(x), level="warning")
|
||||
sys.exit()
|
||||
|
@ -104,7 +104,8 @@ def connect_callback(cli):
|
||||
def prepare_stuff(*args):
|
||||
# just in case we haven't managed to successfully auth yet
|
||||
if not botconfig.SASL_AUTHENTICATION:
|
||||
cli.ns_identify(botconfig.PASS,
|
||||
cli.ns_identify(botconfig.USERNAME or botconfig.NICK,
|
||||
botconfig.PASS,
|
||||
nickserv=var.NICKSERV,
|
||||
command=var.NICKSERV_IDENTIFY_COMMAND)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user