From f52ae77db0199703e10101b985ec1ab4af26f288 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 6 Mar 2014 20:21:12 -0800 Subject: [PATCH] irkerd: Replace 'password' global with local Connection.password Using the new kwargs handling to pass the data through Irker() down to Connection(). Note that this is the nickserv password, not the server-wide login password used by Connection.connect(). --- irkerd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/irkerd b/irkerd index bb54f85..619cdbb 100755 --- a/irkerd +++ b/irkerd @@ -381,11 +381,12 @@ def is_channel(string): class Connection: def __init__(self, irker, target, nick_template, nick_needs_number=False, - **kwargs): + password=None, **kwargs): self.irker = irker self.target = target self.nick_template = nick_template self.nick_needs_number = nick_needs_number + self.password = password self.kwargs = kwargs self.nick_trial = None self.connection = None @@ -412,8 +413,8 @@ class Connection: "The server says we're OK, with a non-conflicting nick." self.status = "ready" LOG.info("nick %s accepted" % self.nickname()) - if password: - self.connection.privmsg("nickserv", "identify %s" % password) + if self.password: + self.connection.privmsg("nickserv", "identify %s" % self.password) def handle_badnick(self): "The server says our nick is ill-formed or has a conflict." LOG.info("nick %s rejected" % self.nickname()) @@ -933,6 +934,7 @@ if __name__ == '__main__': logfile=logfile, nick_template=nick_template, nick_needs_number=re.search("%.*d", nick_template), + password=password, ) LOG.info("irkerd version %s" % version) if immediate: -- 2.26.2