]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/override_squit.cpp
Make connect class debug logging more complete and consistent.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / override_squit.cpp
index 1d0781dc33f51d1646525aeaa6b1ed19e2049ec2..32f8caf04f3bab5422f3830de0730afc0f5cdcf2 100644 (file)
@@ -1,7 +1,13 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2007 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2013-2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2013, 2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007 Craig Edwards <brain@inspircd.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -25,7 +31,7 @@
 #include "treeserver.h"
 #include "treesocket.h"
 
-ModResult ModuleSpanningTree::HandleSquit(const std::vector<std::string>& parameters, User* user)
+ModResult ModuleSpanningTree::HandleSquit(const CommandBase::Params& parameters, User* user)
 {
        TreeServer* s = Utils->FindServerMask(parameters[0]);
        if (s)
@@ -36,14 +42,10 @@ ModResult ModuleSpanningTree::HandleSquit(const std::vector<std::string>& parame
                        return MOD_RES_DENY;
                }
 
-               TreeSocket* sock = s->GetSocket();
-
                if (s->IsLocal())
                {
                        ServerInstance->SNO->WriteToSnoMask('l',"SQUIT: Server \002%s\002 removed from network by %s",parameters[0].c_str(),user->nick.c_str());
-                       sock->Squit(s,"Server quit by " + user->GetFullRealHost());
-                       ServerInstance->SE->DelFd(sock);
-                       sock->Close();
+                       s->SQuit("Server quit by " + user->GetFullRealHost());
                }
                else
                {