--- /dev/null
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
+ *
+ * Copyright (C) 2009 Daniel De Graaf <danieldg@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
+ * License as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#pragma once
+
+#include "event.h"
+
+class ServerEventListener : public Events::ModuleEventListener
+{
+ public:
+ ServerEventListener(Module* mod)
+ : ModuleEventListener(mod, "event/server")
+ {
+ }
+
+ /** Fired when a server finishes burst
+ * @param server Server that recently linked and finished burst
+ */
+ virtual void OnServerLink(const Server* server) { }
+
+ /** Fired when a server splits
+ * @param server Server that split
+ */
+ virtual void OnServerSplit(const Server* server) { }
+};
+++ /dev/null
-/*
- * InspIRCd -- Internet Relay Chat Daemon
- *
- * Copyright (C) 2009 Daniel De Graaf <danieldg@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
- * License as published by the Free Software Foundation, version 2.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#pragma once
-
-#include "event.h"
-
-class SpanningTreeEventListener : public Events::ModuleEventListener
-{
- public:
- SpanningTreeEventListener(Module* mod)
- : ModuleEventListener(mod, "event/spanningtree")
- {
- }
-
- /** Fired when a server finishes burst
- * @param server Server that recently linked and finished burst
- */
- virtual void OnServerLink(const Server* server) { }
-
- /** Fired when a server splits
- * @param server Server that split
- */
- virtual void OnServerSplit(const Server* server) { }
-};
#include "modules/account.h"
#include "modules/sasl.h"
#include "modules/ssl.h"
-#include "modules/spanningtree.h"
+#include "modules/server.h"
enum
{
static std::string sasl_target;
-class ServerTracker : public SpanningTreeEventListener
+class ServerTracker : public ServerEventListener
{
bool online;
public:
ServerTracker(Module* mod)
- : SpanningTreeEventListener(mod)
+ : ServerEventListener(mod)
{
Reset();
}
#include "socket.h"
#include "xline.h"
#include "iohook.h"
-#include "modules/spanningtree.h"
+#include "modules/server.h"
#include "resolvers.h"
#include "main.h"
: rconnect(this), rsquit(this), map(this)
, commands(this)
, currmembid(0)
- , eventprov(this, "event/spanningtree")
+ , eventprov(this, "event/server")
, DNS(this, "DNS")
, loopCall(false)
{
{
TreeServer* server = i->second;
if (!server->IsRoot())
- FOREACH_MOD_CUSTOM(GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (server));
+ FOREACH_MOD_CUSTOM(GetEventProvider(), ServerEventListener, OnServerSplit, (server));
}
return;
}
#include "inspircd.h"
#include "xline.h"
#include "main.h"
-#include "modules/spanningtree.h"
+#include "modules/server.h"
#include "utils.h"
#include "treeserver.h"
this->AddHashEntry();
Parent->Children.push_back(this);
- FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerLink, (this));
+ FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnServerLink, (this));
}
void TreeServer::BeginBurst(uint64_t startms)
RemoveHash();
if (!Utils->Creator->dying)
- FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (this));
+ FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnServerSplit, (this));
}
unsigned int TreeServer::QuitUsers(const std::string& reason)
#include "iohook.h"
#include "main.h"
-#include "modules/spanningtree.h"
+#include "modules/server.h"
#include "utils.h"
#include "treeserver.h"
#include "link.h"