/*
* 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
#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)
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
{