From 66c6323fb75e64f40ed10970c3a0dbc9efed2a31 Mon Sep 17 00:00:00 2001 From: Thomas Coppi Date: Sun, 23 Sep 2007 14:55:04 -0600 Subject: [PATCH] Let scrappy auto-identify to nickserv if you give it a password --- modules/config.py | 2 +- scrappy.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/config.py b/modules/config.py index 78288b3..ce3aff4 100644 --- a/modules/config.py +++ b/modules/config.py @@ -12,5 +12,5 @@ def __init__(scrap): scrap.nickservpass = "121212" #identify with nickserv or not - scrap.identify = False + scrap.identify = True diff --git a/scrappy.py b/scrappy.py index a644552..95871ca 100755 --- a/scrappy.py +++ b/scrappy.py @@ -33,6 +33,8 @@ class scrappy: self.nickname = 'Scrappy' self.username = 'scrappy' self.realname = 'Scrappy Bot' + self.nickservpass = '' + self.identify = False self.server = '' self.port = 6667 self.chanlist = [] @@ -63,7 +65,7 @@ class scrappy: def parse_argv(self): """Parse the commandline args and print a usage message if incorrect.""" - if len(sys.argv) < 3: #Need at least server and nick + if len(sys.argv) < 3: #Need at least server self.print_usage() sys.exit(1) @@ -144,6 +146,9 @@ class scrappy: if irclib_scrappy.is_channel(ch) : c.join(ch) + if self.identify == True: + self.c.privmsg("nickserv", "identify %s" % self.nickservpass) + def on_pubmsg(self, c, event): arg = event.arguments()[0] iscmd = False -- 2.11.4.GIT