Pass in ALL parameters on init and use self in quit
This commit is contained in:
parent
83a973050f
commit
fb5bb2ec18
1 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ class Logbot(SingleServerIRCBot):
|
||||||
print "Press Ctrl-C to quit"
|
print "Press Ctrl-C to quit"
|
||||||
|
|
||||||
def quit(self):
|
def quit(self):
|
||||||
bot.connection.disconnect("Quitting...")
|
self.connection.disconnect("Quitting...")
|
||||||
|
|
||||||
def color(self, user):
|
def color(self, user):
|
||||||
return "#%s" % md5(user).hexdigest()[:6]
|
return "#%s" % md5(user).hexdigest()[:6]
|
||||||
|
@ -281,7 +281,7 @@ def main():
|
||||||
write_string("logs/index.html", html_header.replace("%title%", "Chat Logs"))
|
write_string("logs/index.html", html_header.replace("%title%", "Chat Logs"))
|
||||||
|
|
||||||
# Start the bot
|
# Start the bot
|
||||||
bot = Logbot(SERVER, PORT, CHANNELS)
|
bot = Logbot(SERVER, PORT, SERVER_PASS, CHANNELS, NICK, NICK_PASS)
|
||||||
try:
|
try:
|
||||||
bot.start()
|
bot.start()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue