diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-13 19:30:34 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-13 19:30:34 +0000 |
commit | d0706f5d5702898a4f9c3d2ceb8b1da3daad38c4 (patch) | |
tree | 128dfd27feca6109bd927166ba45ef688f73b0f6 /src | |
parent | 72e895e5aa255c4a2c95e7a71437f66b6294129e (diff) |
new rsquit command handler, this is still work in progress.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7286 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/rsquit.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp index 2077bd68c..a60d102fa 100644 --- a/src/modules/m_spanningtree/rsquit.cpp +++ b/src/modules/m_spanningtree/rsquit.cpp @@ -44,7 +44,22 @@ CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, userrec *user) { if (IS_LOCAL(user)) { - return (CmdResult)((ModuleSpanningTree*)Creator)->HandleSquit(parameters, pcnt, user, true); + if (!Utils->FindServerMask(parameters[0])) + { + user->WriteServ("NOTICE %s :*** RSQUIT: Server \002%s\002 isn't connected to the network!", user->nick, parameters[0]); + return CMD_FAILURE; + } + user->WriteServ("NOTICE %s :*** RSQUIT: Sending remote squit to \002%s\002 to squit server \002%s\002.",user->nick,parameters[0],parameters[1]); } + + if (ServerInstance->MatchText(ServerInstance->Config->ServerName,parameters[0])) + { + 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); + } + return CMD_SUCCESS; } |