mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fix parsing of 004 message. (Broken in d9531d2d
).
This commit is contained in:
parent
0780d445e2
commit
d2ab53cd19
@ -406,10 +406,10 @@ class IrcState(IrcCommandDispatcher):
|
|||||||
"""Handles parsing the 004 reply
|
"""Handles parsing the 004 reply
|
||||||
|
|
||||||
Supported user and channel modes are cached"""
|
Supported user and channel modes are cached"""
|
||||||
# msg.args = [server, ircd-version, umodes, modes,
|
# msg.args = [nickname, server, ircd-version, umodes, modes,
|
||||||
# modes that require arguments? (non-standard)]
|
# modes that require arguments? (non-standard)]
|
||||||
self.supported['umodes'] = msg.args[2]
|
self.supported['umodes'] = msg.args[3]
|
||||||
self.supported['chanmodes'] = msg.args[3]
|
self.supported['chanmodes'] = msg.args[4]
|
||||||
|
|
||||||
_005converters = utils.InsensitivePreservingDict({
|
_005converters = utils.InsensitivePreservingDict({
|
||||||
'modes': int,
|
'modes': int,
|
||||||
|
@ -292,7 +292,7 @@ class IrcStateTestCase(SupyTestCase):
|
|||||||
|
|
||||||
def testSupportedUmodes(self):
|
def testSupportedUmodes(self):
|
||||||
state = irclib.IrcState()
|
state = irclib.IrcState()
|
||||||
state.addMsg(self.irc, ircmsgs.IrcMsg(':charm.oftc.net 004 charm.oftc.net hybrid-7.2.2+oftc1.6.8 CDGPRSabcdfgiklnorsuwxyz biklmnopstveI bkloveI'))
|
state.addMsg(self.irc, ircmsgs.IrcMsg(':charm.oftc.net 004 adkwbot charm.oftc.net hybrid-7.2.2+oftc1.6.8 CDGPRSabcdfgiklnorsuwxyz biklmnopstveI bkloveI'))
|
||||||
self.assertEqual(state.supported['umodes'], 'CDGPRSabcdfgiklnorsuwxyz')
|
self.assertEqual(state.supported['umodes'], 'CDGPRSabcdfgiklnorsuwxyz')
|
||||||
self.assertEqual(state.supported['chanmodes'],
|
self.assertEqual(state.supported['chanmodes'],
|
||||||
'biklmnopstveI')
|
'biklmnopstveI')
|
||||||
|
Loading…
Reference in New Issue
Block a user