diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-15 10:05:39 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-15 10:05:39 +0000 |
commit | 02c6ce1ad09a7471a6b03dc00bac4b843d157489 (patch) | |
tree | 960d7b559d20c0c87927c4244a13fa321196c05b | |
parent | 2bb87d95c615991d9bd1db95ee654900b06c3b09 (diff) |
Fix crash on propogation after routed squit has reached it's destination. Thx HiroP.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7330 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree/rsquit.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp index cfe2a8c90..86ba4d306 100644 --- a/src/modules/m_spanningtree/rsquit.cpp +++ b/src/modules/m_spanningtree/rsquit.cpp @@ -66,17 +66,20 @@ CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, userrec *user) NoticeUser(user, "*** RSQUIT: Foolish mortal, you cannot make a server SQUIT itself! ("+ConvToStr(parameters[1])+" matches local server name)"); return CMD_FAILURE; } - TreeSocket* sock = s->GetSocket(); - if (!sock) + if (s) { - NoticeUser(user, "*** RSQUIT: Server \002"+ConvToStr(parameters[1])+"\002 isn't connected to \002"+ConvToStr(parameters[0])+"\002."); - return CMD_FAILURE; + TreeSocket* sock = s->GetSocket(); + if (!sock) + { + NoticeUser(user, "*** RSQUIT: Server \002"+ConvToStr(parameters[1])+"\002 isn't connected to \002"+ConvToStr(parameters[0])+"\002."); + return CMD_FAILURE; + } + ServerInstance->SNO->WriteToSnoMask('l',"Remote SQUIT from %s matching \002%s\002, squitting server \002%s\002",user->nick,parameters[0],parameters[1]); + const char* para[1]; + para[0] = parameters[1]; + std::string original_command = std::string("SQUIT ") + parameters[1]; + Creator->OnPreCommand("SQUIT", para, 1, user, true, original_command); } - ServerInstance->SNO->WriteToSnoMask('l',"Remote SQUIT from %s matching \002%s\002, squitting server \002%s\002",user->nick,parameters[0],parameters[1]); - const char* para[1]; - para[0] = parameters[1]; - std::string original_command = std::string("SQUIT ") + parameters[1]; - Creator->OnPreCommand("SQUIT", para, 1, user, true, original_command); } } else |