Let's not store modes +/-ovh.

This commit is contained in:
Jeremy Fincher 2004-07-31 08:26:04 +00:00
parent 9772c45af3
commit 38c4422f88

View File

@ -241,9 +241,11 @@ class ChannelState(object):
self.voices.discard(user) self.voices.discard(user)
def setMode(self, mode, value=None): def setMode(self, mode, value=None):
assert mode not in 'ovh'
self.modes[mode] = value self.modes[mode] = value
def unsetMode(self, mode): def unsetMode(self, mode):
assert mode not in 'ovh'
if mode in self.modes: if mode in self.modes:
del self.modes[mode] del self.modes[mode]
@ -369,10 +371,9 @@ class IrcState(IrcCommandDispatcher):
chan = self.channels[channel] chan = self.channels[channel]
for (mode, value) in ircutils.separateModes(msg.args[2:]): for (mode, value) in ircutils.separateModes(msg.args[2:]):
modeChar = mode[1] modeChar = mode[1]
if mode[0] == '+': if mode[0] == '+' and mode[1] not in 'ovh':
chan.setMode(modeChar, value) chan.setMode(modeChar, value)
else: elif mode[0] == '-' and mode[1] not in 'ovh':
assert mode[0] == '-'
chan.unsetMode(modeChar) chan.unsetMode(modeChar)
def do353(self, irc, msg): def do353(self, irc, msg):