Fixed minor bug in IrcMsgQueue and removed needless if statement

This commit is contained in:
Jeremy Fincher 2003-03-31 22:21:42 +00:00
parent a52a1fe6d6
commit df77cfaccf
1 changed files with 4 additions and 4 deletions

View File

@ -101,8 +101,9 @@ class IrcMsgQueue(object):
self.queue = [] self.queue = []
def enqueueMsg(self, msg): def enqueueMsg(self, msg):
if msg in self.msgs and not world.startup: if msg in self.msgs:
debug.debugMsg('Not adding msg %s to queue' % msg, 'normal') if not world.startup:
debug.debugMsg('Not adding msg %s to queue' % msg, 'normal')
else: else:
self.msgs.add(msg) self.msgs.add(msg)
self.queue.append(msg) self.queue.append(msg)
@ -110,8 +111,7 @@ class IrcMsgQueue(object):
def dequeueMsg(self): def dequeueMsg(self):
if self.queue: if self.queue:
msg = self.queue.pop(0) msg = self.queue.pop(0)
if msg in self.msgs: self.msgs.remove(msg)
self.msgs.remove(msg)
return msg return msg
else: else:
return None return None