summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:48 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:48 +0000
commit24731c63b6320be22f7b3220236271fa7476b975 (patch)
tree615959bfd36dd30bc5c067c4501dbfb8a2e8cb8b /src/modules/m_spanningtree
parent79f9faeec84fbcb704b45811b9851148ab1cb20b (diff)
Add Module* creator to Command and ModeHandler
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11631 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp4
-rw-r--r--src/modules/m_spanningtree/rconnect.cpp6
-rw-r--r--src/modules/m_spanningtree/rconnect.h1
-rw-r--r--src/modules/m_spanningtree/rsquit.cpp4
-rw-r--r--src/modules/m_spanningtree/rsquit.h1
5 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index 545ad3bfb..0988fe099 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -60,11 +60,11 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::ve
}
else
{
- Module* srcmodule = ServerInstance->Modules->Find(thiscmd->source);
+ Module* srcmodule = thiscmd->creator;
if (srcmodule && !(srcmodule->GetVersion().Flags & VF_COMMON)) {
ServerInstance->Logs->Log("m_spanningtree",ERROR,"Routed command %s from non-VF_COMMON module %s",
- command.c_str(), thiscmd->source.c_str());
+ command.c_str(), srcmodule->ModuleSourceFile.c_str());
return;
}
}
diff --git a/src/modules/m_spanningtree/rconnect.cpp b/src/modules/m_spanningtree/rconnect.cpp
index 3275d057e..3e084dc19 100644
--- a/src/modules/m_spanningtree/rconnect.cpp
+++ b/src/modules/m_spanningtree/rconnect.cpp
@@ -28,9 +28,9 @@
/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */
-CommandRConnect::CommandRConnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RCONNECT", "o", 2), Creator(Callback), Utils(Util)
+CommandRConnect::CommandRConnect (InspIRCd* Instance, Module* Creator, SpanningTreeUtilities* Util)
+ : Command(Instance, Creator, "RCONNECT", "o", 2), Utils(Util)
{
- this->source = "m_spanningtree.so";
syntax = "<remote-server-mask> <target-server-mask>";
}
@@ -55,7 +55,7 @@ CmdResult CommandRConnect::Handle (const std::vector<std::string>& parameters, U
para.push_back(parameters[1]);
std::string cmd("CONNECT");
std::string original_command = cmd + " " + parameters[1];
- Creator->OnPreCommand(cmd, para, user, true, original_command);
+ creator->OnPreCommand(cmd, para, user, true, original_command);
}
return CMD_SUCCESS;
}
diff --git a/src/modules/m_spanningtree/rconnect.h b/src/modules/m_spanningtree/rconnect.h
index a9958c554..f038f5c22 100644
--- a/src/modules/m_spanningtree/rconnect.h
+++ b/src/modules/m_spanningtree/rconnect.h
@@ -18,7 +18,6 @@
*/
class CommandRConnect : public Command
{
- Module* Creator; /* Creator */
SpanningTreeUtilities* Utils; /* Utility class */
public:
CommandRConnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp
index a5dd31752..e9c69a1d4 100644
--- a/src/modules/m_spanningtree/rsquit.cpp
+++ b/src/modules/m_spanningtree/rsquit.cpp
@@ -26,9 +26,9 @@
/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */
-CommandRSQuit::CommandRSQuit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RSQUIT", "o", 1), Creator(Callback), Utils(Util)
+CommandRSQuit::CommandRSQuit (InspIRCd* Instance, Module* Creator, SpanningTreeUtilities* Util)
+ : Command(Instance, Creator, "RSQUIT", "o", 1), Utils(Util)
{
- this->source = "m_spanningtree.so";
syntax = "<target-server-mask> [reason]";
}
diff --git a/src/modules/m_spanningtree/rsquit.h b/src/modules/m_spanningtree/rsquit.h
index 96af64108..92f6eb159 100644
--- a/src/modules/m_spanningtree/rsquit.h
+++ b/src/modules/m_spanningtree/rsquit.h
@@ -18,7 +18,6 @@
*/
class CommandRSQuit : public Command
{
- Module* Creator; /* Creator */
SpanningTreeUtilities* Utils; /* Utility class */
public:
CommandRSQuit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);