A little logging, etc.

This commit is contained in:
Jeremy Fincher 2004-04-18 00:38:54 +00:00
parent 069d48b269
commit 7850da79d5

View File

@ -465,7 +465,10 @@ class Irc(IrcCommandDispatcher):
self.driver = None # The driver should set this later.
if self.password:
self.queue.enqueue(ircmsgs.password(self.password))
log.info('Sending NICK command, nick is %s.', self.nick)
self.queue.enqueue(ircmsgs.nick(self.nick))
log.info('Sending USER command, ident is %s, user is %s.',
self.nick, self.user)
self.queue.enqueue(ircmsgs.user(self.ident, self.user))
def reset(self):
@ -486,6 +489,9 @@ class Irc(IrcCommandDispatcher):
for callback in self.callbacks:
callback.reset()
def __repr__(self):
return '<irclib.Irc object for %s>' % self.server
def addCallback(self, callback):
"""Adds a callback to the callbacks list."""
self.callbacks.append(callback)