/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2017 B00mX0r <b00mx0r@aureus.pw>
+ * Copyright (C) 2013, 2017, 2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2012-2015 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
* Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- * Copyright (C) 2007 Craig Edwards <craigedwards@brainbox.cc>
*
* 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
std::string rawversion;
TreeSocket* Socket; /* Socket used to communicate with this server */
- std::string sid; /* Server ID */
/** Counter counting how many servers are bursting in front of this server, including
* this server. Set to parents' value on construction then it is increased if the
/** Used by SQuit logic to recursively remove servers
*/
- void SQuitInternal(unsigned int& num_lost_servers);
+ void SQuitInternal(unsigned int& num_lost_servers, bool error);
/** Remove the reference to this server from the hash maps
*/
/** SQuit a server connected to this server, removing the given server and all servers behind it
* @param server Server to squit, must be directly below this server
* @param reason Reason for quitting the server, sent to opers and other servers
+ * @param error Whether the server is being squit because of an error.
*/
- void SQuitChild(TreeServer* server, const std::string& reason);
+ void SQuitChild(TreeServer* server, const std::string& reason, bool error = false);
/** SQuit this server, removing this server and all servers behind it
* @param reason Reason for quitting the server, sent to opers and other servers
+ * @param error Whether the server is being squit because of an error.
*/
- void SQuit(const std::string& reason)
+ void SQuit(const std::string& reason, bool error = false)
{
- GetParent()->SQuitChild(this, reason);
+ GetParent()->SQuitChild(this, reason, error);
}
static unsigned int QuitUsers(const std::string& reason);
*/
const ChildServers& GetChildren() const { return Children; }
- /** Get server ID
- */
- const std::string& GetID() const { return sid; }
-
/** Marks a server as having finished bursting and performs appropriate actions.
*/
void FinishBurst();