mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 21:29:24 +01:00
Let's not store modes +/-ovh.
This commit is contained in:
parent
9772c45af3
commit
38c4422f88
@ -241,9 +241,11 @@ class ChannelState(object):
|
||||
self.voices.discard(user)
|
||||
|
||||
def setMode(self, mode, value=None):
|
||||
assert mode not in 'ovh'
|
||||
self.modes[mode] = value
|
||||
|
||||
def unsetMode(self, mode):
|
||||
assert mode not in 'ovh'
|
||||
if mode in self.modes:
|
||||
del self.modes[mode]
|
||||
|
||||
@ -369,10 +371,9 @@ class IrcState(IrcCommandDispatcher):
|
||||
chan = self.channels[channel]
|
||||
for (mode, value) in ircutils.separateModes(msg.args[2:]):
|
||||
modeChar = mode[1]
|
||||
if mode[0] == '+':
|
||||
if mode[0] == '+' and mode[1] not in 'ovh':
|
||||
chan.setMode(modeChar, value)
|
||||
else:
|
||||
assert mode[0] == '-'
|
||||
elif mode[0] == '-' and mode[1] not in 'ovh':
|
||||
chan.unsetMode(modeChar)
|
||||
|
||||
def do353(self, irc, msg):
|
||||
|
Loading…
Reference in New Issue
Block a user