summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-09-10 13:54:01 +0200
committerattilamolnar <attilamolnar@hush.com>2013-09-10 13:54:01 +0200
commit2f753f7864bf847af26f7a1aedc727927c163738 (patch)
tree34f7fd6d14f2d39073e398f02001cf00f1669b9f /src/modules/m_spanningtree
parenta48e3a4d5c96555f5a8df8b25c9796ae9314ad1e (diff)
m_spanningtree Move c2s commands out of SpanningTreeCommands to auto register them
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/commands.h5
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/main.h9
-rw-r--r--src/modules/m_spanningtree/rsquit.cpp1
4 files changed, 14 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h
index f15708a9a..9690eba46 100644
--- a/src/modules/m_spanningtree/commands.h
+++ b/src/modules/m_spanningtree/commands.h
@@ -19,7 +19,7 @@
#pragma once
-#include "main.h"
+#include "servercommand.h"
#include "commandbuilder.h"
/** Handle /RCONNECT
@@ -331,9 +331,6 @@ class CommandEndBurst : public ServerOnlyServerCommand<CommandEndBurst>
class SpanningTreeCommands
{
public:
- CommandRConnect rconnect;
- CommandRSQuit rsquit;
- CommandMap map;
CommandSVSJoin svsjoin;
CommandSVSPart svspart;
CommandSVSNick svsnick;
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index fed55d4fd..f264f9a7a 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -36,13 +36,13 @@
#include "protocolinterface.h"
ModuleSpanningTree::ModuleSpanningTree()
- : commands(NULL), DNS(this, "DNS")
+ : rconnect(this), rsquit(this), map(this)
+ , commands(NULL), DNS(this, "DNS")
{
}
SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module)
- : rconnect(module), rsquit(module), map(module),
- svsjoin(module), svspart(module), svsnick(module), metadata(module),
+ : svsjoin(module), svspart(module), svsnick(module), metadata(module),
uid(module), opertype(module), fjoin(module), ijoin(module), resync(module),
fmode(module), ftopic(module), fhost(module), fident(module), fname(module),
away(module), addline(module), delline(module), encap(module), idle(module),
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 10f698f22..8a13c7814 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -26,6 +26,7 @@
#include "inspircd.h"
#include "modules/dns.h"
#include "servercommand.h"
+#include "commands.h"
/** If you make a change which breaks the protocol, increment this.
* If you completely change the protocol, completely change the number.
@@ -52,6 +53,14 @@ class Autoconnect;
*/
class ModuleSpanningTree : public Module
{
+ /** Client to server commands, registered in the core
+ */
+ CommandRConnect rconnect;
+ CommandRSQuit rsquit;
+ CommandMap map;
+
+ /** Server to server only commands, not registered in the core
+ */
SpanningTreeCommands* commands;
public:
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp
index 3b7468491..988918c3f 100644
--- a/src/modules/m_spanningtree/rsquit.cpp
+++ b/src/modules/m_spanningtree/rsquit.cpp
@@ -20,6 +20,7 @@
#include "inspircd.h"
+#include "main.h"
#include "utils.h"
#include "treeserver.h"
#include "commands.h"