diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 5f1ad99de..2b9da4a6c 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1583,6 +1583,25 @@ class ModuleSpanningTree : public Module int HandleSquit(char** parameters, int pcnt, userrec* user) { + TreeServer* s = FindServer(quitserver); + if (s) + { + TreeSocket* sock = s->GetSocket(); + if (sock) + { + WriteOpers("*** SQUIT: Server \002%s\002 removed from network by %s",parameters[0],user->nick); + Squit(s,"Server quit by "+std::string(user->nick)+"!"+std::string(user->ident)+"@"+std::string(user->host)); + sock->Close(); + } + else + { + WriteServ(user->fd,"NOTICE %s :*** SQUIT: The server \002%s\002 is not directly connected.",user->nick,parameters[0]); + } + } + else + { + WriteServ(user->fd,"NOTICE %s :*** SQUIT: The server \002%s\002 does not exist on the network.",user->nick,parameters[0]); + } return 1; } |