"The server says we're OK, with a non-conflicting nick."
self.status = "ready"
self.irker.debug(1, "nick %s accepted" % self.nickname())
+ if password:
+ self.connection.privmsg("nickserv", "identify %s" % password)
def handle_badnick(self):
"The server says our nick is ill-formed or has a conflict."
self.irker.debug(1, "nick %s rejected" % self.nickname())
self.debug(1, "irker has been kicked from %s on %s" % (target, connection.server))
if connection.context:
connection.context.handle_kick(target)
- def _handle_all_raw_messages(self, connection, event):
+ def _handle_all_raw_messages(self, _connection, event):
"Log all messages when in watcher mode."
with open(logfile, "w") as logfp:
logfp.write("%03f|%s|%s\n" % \
if __name__ == '__main__':
debuglvl = 0
namestyle = "irker%03d"
+ password = None
logfile = None
- (options, arguments) = getopt.getopt(sys.argv[1:], "d:l:n:V:")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "d:l:n:p:V:")
for (opt, val) in options:
if opt == '-d': # Enable debug/progress messages
debuglvl = int(val)
logfile = val
elif opt == '-n': # Force the nick
namestyle = val
+ elif opt == '-p': # Set a nickserv password
+ password = val
elif opt == '-V': # Emit version and exit
sys.stdout.write("irkerd version %s\n" % version)
sys.exit(0)
<arg>-d <replaceable>debuglevel</replaceable></arg>
<arg>-l <replaceable>logfile</replaceable></arg>
<arg>-n <replaceable>nick</replaceable></arg>
+ <arg>-p <replaceable>password</replaceable></arg>
<arg>-V</arg>
</cmdsynopsis>
</refsynopsisdiv>
in the event of a nick collision.</para></listitem>
</varlistentry>
<varlistentry>
+<term>-p</term>
+<listitem><para>Takes a following value, setting a nickserv
+password to be used. If given, this password is shipped to
+authenticate the nick on receipt of a welcom message.</para></listitem>
+</varlistentry>
+<varlistentry>
<term>-V</term>
<listitem><para>Write the program version to stdout and
terminate.</para></listitem>