diff options
| author | 2006-06-30 17:54:58 +0000 | |
|---|---|---|
| committer | 2006-06-30 17:54:58 +0000 | |
| commit | 9388588f05ac46f37bb66ff31b1e9085db1c218f (patch) | |
| tree | a91c84adc836467e33d3f5030328f45d0c0e29b7 /src/modules/m_spanningtree.cpp | |
| parent | Made CullList::Apply return something other than 0, and added myself to the l... (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/branches/1_0_stable@4089 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
| -rw-r--r-- | src/modules/m_spanningtree.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 2a0865470..72e65113f 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2609,6 +2609,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); @@ -3734,6 +3739,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 ¶meter) |
