Squashed commit of the following:
commit 4e481f15db372d5c07f30e92f6581ea93692695b
Author: James Lu <GLolol1@hotmail.com>
Date: Wed Jul 22 19:28:34 2015 -0700
relay: Factorize relayJoins usage in initializeChannel and truly fix#74.
The real error was that queued_users was being defined in the wrong spot (outside of the for loop),
so the user list would grow larger and larger with every network initialized.
This reverts parts of the previous commit which weren't actually necessary.
commit 76cc6bfbc71439880f01891f944600a26ff81130
Author: James Lu <GLolol1@hotmail.com>
Date: Wed Jul 22 13:34:47 2015 -0700
Mark users as internal at the IrcUser level (attempt to fix#74)
This introduces a new spawnIfMissing option in getRemoteUser, which defaults to True and toggles spawning new pseudoclients if one is not found for a certain network.
In the case of TOPIC or PART being sent, we'll want this turned off because we can either 1) route these through our PyLink server SID, or 2) ignore these entirely.
For KICK handling, this commit fixes kicks sent from servers or clients that don't have a pseudoclient on the target network, by tagging them in the message and routing them through our main PyLink SID.
Normal kicks still behave as usual:
* You have been kicked from #endlessvoid by GLo|o|/ovd (test)
* You have been kicked from #endlessvoid by pylink-devel.overdrive.pw ((ChanServ/ovd) (GLo|o| (GLolol)) test)
* You have been kicked from #endlessvoid by pylink-devel.overdrive.pw ((some.server.name/ovd) No reason given)
The old behavior, which iterated over the pseudoclients representing the sender, dropped messages to clients without a common channel without any warning. Now, the sender will get a lovely notice from the PyLink client.
Trying to send to a '-n' channel without being in it:
-PyLink-devel- Error: You must be in '#channel' in order to send messages.
Trying to message a user without sharing a common channel:
-PyLink-devel- Error: You must be in a common channel with 'GLolol/testnet' in order to send messages.
Closes#62.
This introduces a new PYLINK_DISCONNECT meta-hook that is called when a network disconnects. Also, reset the state variables (i.e. servers, users, etc.) on disconnect! (this was missed before)
Closes#60.
Closes#48. This fixes the edge case where, if a person with a long, cut-off nick changes to another long nick, and the resulting normalized nick is the same,
normalizeNick will start incrementing the separator anyway. The correct behavior is to NOT send any nick changes if the old (normalized) nick and the new nick
match.