mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
oops, got this reversed.
This commit is contained in:
parent
ff7622b083
commit
f2fd7c9e66
@ -339,11 +339,14 @@ class IrcState(IrcCommandDispatcher):
|
||||
|
||||
})
|
||||
def _prefixParser(s):
|
||||
if ')' in s:
|
||||
(left, right) = s.split(')')
|
||||
assert left[0] == '(', 'Odd PREFIX in 005: %s' % s
|
||||
left = left[1:]
|
||||
assert len(left) == len(right), 'Odd PREFIX in 005: %s' % s
|
||||
return dict(zip(left, right))
|
||||
else:
|
||||
return dict(zip('ovh', s))
|
||||
_005converters['prefix'] = _prefixParser
|
||||
del _prefixParser
|
||||
def do005(self, irc, msg):
|
||||
|
@ -225,6 +225,13 @@ class IrcStateTestCase(SupyTestCase):
|
||||
conf.supybot.protocols.irc.maxHistoryLength():])
|
||||
conf.supybot.protocols.irc.maxHistoryLength.setValue(oldconfmaxhistory)
|
||||
|
||||
def testWasteland005(self):
|
||||
state = irclib.IrcState()
|
||||
# Here we're testing if PREFIX works without the (ov) there.
|
||||
state.addMsg(self.irc, ircmsgs.IrcMsg(':desolate.wasteland.org 005 jemfinch NOQUIT WATCH=128 SAFELIST MODES=6 MAXCHANNELS=10 MAXBANS=100 NICKLEN=30 TOPICLEN=307 KICKLEN=307 CHANTYPES=&# PREFIX=@+ NETWORK=DALnet SILENCE=10 :are available on this server'))
|
||||
self.assertEqual(state.supported['prefix']['o'], '@')
|
||||
self.assertEqual(state.supported['prefix']['v'], '+')
|
||||
|
||||
def testEmptyTopic(self):
|
||||
state = irclib.IrcState()
|
||||
state.addMsg(self.irc, ircmsgs.topic('#foo'))
|
||||
|
Loading…
Reference in New Issue
Block a user