Changed Channel to make it more in-line with future sets.Set.

This commit is contained in:
Jeremy Fincher 2003-04-05 10:27:02 +00:00
parent a3c4b9bc0b
commit cf8c5c01cf
1 changed files with 6 additions and 6 deletions

View File

@ -146,10 +146,10 @@ class Channel(object):
self.voices = set() self.voices = set()
def removeUser(self, user): def removeUser(self, user):
self.users.remove(user) self.users.discard(user)
self.ops.remove(user) self.ops.discard(user)
self.halfops.remove(user) self.halfops.discard(user)
self.voices.remove(user) self.voices.discard(user)
class IrcState(object): class IrcState(object):
"""Maintains state of the Irc connection. Should also become smarter. """Maintains state of the Irc connection. Should also become smarter.
@ -264,9 +264,9 @@ class Irc(object):
Handles PING commands already. Handles PING commands already.
""" """
_nickSetters = set('001', '002', '003', '004', '250', '251', '252', '254', _nickSetters = set(('001', '002', '003', '004', '250', '251', '252', '254',
'255', '265', '266', '372', '375', '376', '333', '353', '255', '265', '266', '372', '375', '376', '333', '353',
'332', '366') '332', '366'))
def __init__(self, nick, user='', ident='', callbacks=None): def __init__(self, nick, user='', ident='', callbacks=None):
world.ircs.append(self) world.ircs.append(self)
self.nick = nick self.nick = nick