mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +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)
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user