mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
irclib: Filter out unsupported umodes before sending them to the server
Closes: Sf#3075891
Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit b23480b915
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
edbf43f81f
commit
23bfe116ff
@ -929,9 +929,14 @@ class Irc(IrcCommandDispatcher):
|
||||
# Let's reset nicks in case we had to use a weird one.
|
||||
self.alternateNicks = conf.supybot.nick.alternates()[:]
|
||||
umodes = conf.supybot.protocols.irc.umodes()
|
||||
supported = self.supported.get('umodes')
|
||||
if umodes:
|
||||
if umodes[0] not in '+-':
|
||||
umodes = '+' + umodes
|
||||
addSub = '+'
|
||||
if umodes[0] in '+-':
|
||||
(addSub, umodes) = (umodes[0], umodes[1:])
|
||||
if supported:
|
||||
umodes = filter(lamda m: m in supported, umodes)
|
||||
umodes = ''.join(addSub, umodes)
|
||||
log.info('Sending user modes to %s: %s', self.network, umodes)
|
||||
self.sendMsg(ircmsgs.mode(self.nick, umodes))
|
||||
do377 = do422 = do376
|
||||
|
Loading…
Reference in New Issue
Block a user