These module-level variables had historically been created such that reloading
the module wouldn't redefine the variable. However, none of our code reloads
the modules and the guard to prevent redefining the variable was broken so it
would've been redefined anyway.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
When noJoinsUntilIdentified config is true, the bot holds join messages in a 'waitingJoins' list, and processes them
once nickserv identification comes through. The problem was that when the bot is configured to join multiple networks,
join messages from different networks would get appended to the same list, without any differentiation by which message
belongs to which network. Thus, if there are messages waiting for multiple networks, it would often be the case that
whichever network got identification done first, would 'pick up' other network's join messages.
This fix stores the network name along with the join messages in the list, and has each network pick out only its own
join messages.
Conflicts:
src/version.py
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
unbans did send the repr() of the ban list, and IrcMsg.__hash__ did try to hash a list.
Conflicts:
src/version.py
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This also fixes a long-standing failing Misc test since it was relying on the
receivedAt tag.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
At a minimum, the message gives us the server name, ircd version, supported
umodes, and supported channel modes. Add the umodes and channel modes to
self.supported.
Some IRCds (e.g., hybrid and ircd-seven) have an extra arg which seems to be
the channel modes that require arguments.
Signed-off-by: James McCoy <vega.james@gmail.com>
When the feed has a specified encoding, we'll be dealing with unicode objects
in the response from feedparser.parse(). To avoid possible UnicodeErrors, we
need to encode() before handing the string off to other functions, so the
other functions are always dealing with bytestrings instead of bytestrings and
unicode objects. Mixing unicode and bytestrings will cause implicit
conversions of the unicode objects, which will most likely use the wrong
encoding.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
When searching for 'st*ke', 'stryker' would incorrectly match, 'stryke' would
be added to the nick set and the subsequent lookup would cause a KeyError.
This is fixed both by anchoring the regexp ('^st.*ke$' instead of 'st.*ke')
and adding searchNick to the nick set instead of the string that matched the
pattern.
Closes: Sf#3377381
Signed-off-by: James Vega <jamessan@users.sourceforge.net>