Fixed multiple logging of repr'ed msg.

This commit is contained in:
Jeremy Fincher 2004-01-27 11:15:56 +00:00
parent 048db92e65
commit 385d803ec7

View File

@ -505,8 +505,8 @@ class Irc(IrcCommandDispatcher):
self.outstandingPing = True self.outstandingPing = True
self.queueMsg(ircmsgs.ping(now)) self.queueMsg(ircmsgs.ping(now))
if msg: if msg:
log.debug(repr(msg))
for callback in reviter(self.callbacks): for callback in reviter(self.callbacks):
log.debug(repr(msg))
try: try:
outFilter = getattr(callback, 'outFilter') outFilter = getattr(callback, 'outFilter')
except AttributeError, e: except AttributeError, e:
@ -649,10 +649,12 @@ class Irc(IrcCommandDispatcher):
def die(self): def die(self):
"""Makes the Irc object die. Dead.""" """Makes the Irc object die. Dead."""
log.info('Irc object for %s dying.' % self.server) log.info('Irc object for %s dying.' % self.server)
for callback in self.callbacks:
callback.die()
if self in world.ircs: if self in world.ircs:
for callback in self.callbacks:
callback.die()
world.ircs.remove(self) world.ircs.remove(self)
else:
log.warning('Irc object killed twice.')
def __hash__(self): def __hash__(self):
return id(self) return id(self)