mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
irclib: Fix previous commits so RPL_NAMREPLY actually works
Turns out irclib parses ISUPPORT PREFIX properly, so it's not just a raw string; but I didn't test the change live...
This commit is contained in:
parent
45c7615f4a
commit
8fe517f48a
@ -971,7 +971,7 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
|
|||||||
if prefix is None:
|
if prefix is None:
|
||||||
prefix_chars = '@%+&~!' # see the comments in addUser
|
prefix_chars = '@%+&~!' # see the comments in addUser
|
||||||
else:
|
else:
|
||||||
prefix_chars = prefix.split(')', 1)[-1]
|
prefix_chars = ''.join(prefix.values())
|
||||||
|
|
||||||
for item in items.split():
|
for item in items.split():
|
||||||
stripped_item = item.lstrip(prefix_chars)
|
stripped_item = item.lstrip(prefix_chars)
|
||||||
|
@ -554,7 +554,8 @@ class IrcStateTestCase(SupyTestCase):
|
|||||||
|
|
||||||
# Prefixed with chars not in ISUPPORT PREFIX
|
# Prefixed with chars not in ISUPPORT PREFIX
|
||||||
st = irclib.IrcState()
|
st = irclib.IrcState()
|
||||||
st.supported['PREFIX'] = '(ov)@+'
|
st.addMsg(self.irc, ircmsgs.IrcMsg(command='005',
|
||||||
|
args=('*', 'PREFIX=(ov)@+', 'are supported')))
|
||||||
st.addMsg(self.irc, ircmsgs.IrcMsg(command='353',
|
st.addMsg(self.irc, ircmsgs.IrcMsg(command='353',
|
||||||
args=('*', '=', '#chan', 'nick1!u1@h1 @nick2!u2@h2 ~@nick3!u3@h3')))
|
args=('*', '=', '#chan', 'nick1!u1@h1 @nick2!u2@h2 ~@nick3!u3@h3')))
|
||||||
chan_st = st.channels['#chan']
|
chan_st = st.channels['#chan']
|
||||||
|
Loading…
Reference in New Issue
Block a user