mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-22 18:39:31 +01:00
irclib: Properly populate nickToHostmasks on RPL_NAMREPLY
It used to set the nick instead of the hostmask as values...
This commit is contained in:
parent
d308329461
commit
45c7615f4a
@ -978,7 +978,7 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
|
||||
item_prefix = item[0:-len(stripped_item)]
|
||||
if ircutils.isUserHostmask(stripped_item):
|
||||
nick = ircutils.nickFromHostmask(stripped_item)
|
||||
self.nicksToHostmasks[nick] = nick
|
||||
self.nicksToHostmasks[nick] = stripped_item
|
||||
name = item_prefix + nick
|
||||
else:
|
||||
name = item
|
||||
|
@ -548,9 +548,9 @@ class IrcStateTestCase(SupyTestCase):
|
||||
chan_st = st.channels['#chan']
|
||||
self.assertEqual(chan_st.users, ircutils.IrcSet(['nick1', 'nick2', 'nick3']))
|
||||
self.assertEqual(chan_st.ops, ircutils.IrcSet(['nick2', 'nick3']))
|
||||
self.assertEqual(st.nicksToHostmasks['nick1'], 'nick1')
|
||||
self.assertEqual(st.nicksToHostmasks['nick2'], 'nick2')
|
||||
self.assertEqual(st.nicksToHostmasks['nick3'], 'nick3')
|
||||
self.assertEqual(st.nicksToHostmasks['nick1'], 'nick1!u1@h1')
|
||||
self.assertEqual(st.nicksToHostmasks['nick2'], 'nick2!u2@h2')
|
||||
self.assertEqual(st.nicksToHostmasks['nick3'], 'nick3!u3@h3')
|
||||
|
||||
# Prefixed with chars not in ISUPPORT PREFIX
|
||||
st = irclib.IrcState()
|
||||
@ -560,9 +560,9 @@ class IrcStateTestCase(SupyTestCase):
|
||||
chan_st = st.channels['#chan']
|
||||
self.assertEqual(chan_st.users, ircutils.IrcSet(['nick1', 'nick2', '~@nick3']))
|
||||
self.assertEqual(chan_st.ops, ircutils.IrcSet(['nick2']))
|
||||
self.assertEqual(st.nicksToHostmasks['nick1'], 'nick1')
|
||||
self.assertEqual(st.nicksToHostmasks['nick2'], 'nick2')
|
||||
self.assertEqual(st.nicksToHostmasks['~@nick3'], '~@nick3')
|
||||
self.assertEqual(st.nicksToHostmasks['nick1'], 'nick1!u1@h1')
|
||||
self.assertEqual(st.nicksToHostmasks['nick2'], 'nick2!u2@h2')
|
||||
self.assertEqual(st.nicksToHostmasks['~@nick3'], '~@nick3!u3@h3')
|
||||
|
||||
|
||||
class IrcCapsTestCase(SupyTestCase, CapNegMixin):
|
||||
|
Loading…
Reference in New Issue
Block a user