From 85474d31426f6290f47879a5561dcbcc7be13c3b Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Dec 2005 16:34:47 +0000 Subject: Squit stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2150 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/modules') 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; } -- cgit v1.2.3