summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-30 17:54:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-30 17:54:48 +0000
commite5c8ee880b8d122abded2aee54d25641db5e3d4f (patch)
tree18460189e453097574e24cc1917df5a5c8b3d0c0 /src/modules
parent9fc81392b32c9fb6a4c9b6215e2c4987b174ce8a (diff)
*** Interesting fix ***
When a remote kill occurs, the user record for the remotely killed user may still hang around in the servers user list which is used when removing users during a netsplit. I managed to duplicate the old 'crash on netsplit' bug by sending a remote kill to a server, and then squitting that server without receipt of the corresponding QUIT. The fix now removes the user record explicitly upon remote kill (this also includes collisions) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4088 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 44786923c..dc50140b2 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2622,6 +2622,11 @@ class TreeSocket : public InspSocket
userrec* y = Srv->FindNick(prefix);
if (y)
{
+ TreeServer* n = FindServer(y->server);
+ if (n)
+ {
+ n->DelUser(y);
+ }
Srv->QuitUser(y,"Nickname collision");
}
return DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params);
@@ -3740,6 +3745,17 @@ class ModuleSpanningTree : public Module
params.push_back(dest->nick);
params.push_back(":"+reason);
DoOneToMany(source->nick,"KILL",params);
+ /* NOTE: We must remove the user from the servers list here.
+ * If we do not, there is a chance the user could hang around
+ * in the list if there is a desync for example (this would
+ * not be good).
+ * Part of the 'random crash on netsplit' tidying up. -Brain
+ */
+ TreeServer* n = FindServer(dest->server);
+ if (n)
+ {
+ n->DelUser(dest);
+ }
}
virtual void OnRehash(const std::string &parameter)