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:
Valentin Lorentz 2021-07-16 22:53:38 +02:00
parent 45c7615f4a
commit 8fe517f48a
2 changed files with 3 additions and 2 deletions

View File

@ -971,7 +971,7 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
if prefix is None:
prefix_chars = '@%+&~!' # see the comments in addUser
else:
prefix_chars = prefix.split(')', 1)[-1]
prefix_chars = ''.join(prefix.values())
for item in items.split():
stripped_item = item.lstrip(prefix_chars)

View File

@ -554,7 +554,8 @@ class IrcStateTestCase(SupyTestCase):
# Prefixed with chars not in ISUPPORT PREFIX
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',
args=('*', '=', '#chan', 'nick1!u1@h1 @nick2!u2@h2 ~@nick3!u3@h3')))
chan_st = st.channels['#chan']