diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:19:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:19:43 +0000 |
commit | b37a253d962ed7af1ea7a328abf2a1af74f30759 (patch) | |
tree | a43660b037c817393f7b4ab75071fe4f380f1058 /src/modules/m_cban.cpp | |
parent | f9636a2eff46f6829bf9e01c711ab1ba45a7d50a (diff) |
Note: FOR THE MOMENT, this is BROKEN. It wont run right until im done.
Changed Parameter for modules from Server* to InspIRCd*.
TODO: Move remaining Server* Modules into InspIRCd* and remove class Server.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4859 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cban.cpp')
-rw-r--r-- | src/modules/m_cban.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 539932be4..6e4d83fcf 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -24,6 +24,7 @@ #include "modules.h" #include "helperfuncs.h" #include "hashcomp.h" +#include "commands.h" #include "configreader.h" #include "inspircd.h" @@ -63,13 +64,13 @@ cbanlist cbans; class cmd_cban : public command_t { private: - Server *Srv; + InspIRCd* ServerInstance; public: - cmd_cban(Server* Me) : command_t("CBAN", 'o', 1) + cmd_cban(InspIRCd* Me) : command_t("CBAN", 'o', 1), ServerInstance(Me) { this->source = "m_cban.so"; - this->Srv = Me; + this-> syntax = "<channel> [<duration> :<reason>]"; } @@ -102,7 +103,7 @@ class cmd_cban : public command_t // parameters[0] = #channel // parameters[1] = 1h3m2s // parameters[2] = Tortoise abuser - long length = Srv->CalcDuration(parameters[1]); + long length = duration(parameters[1]); std::string reason = (pcnt > 2) ? parameters[2] : "No reason supplied"; cbans.push_back(CBan(parameters[0], user->nick, TIME, length, reason)); @@ -134,10 +135,10 @@ class ModuleCBan : public Module Server* Srv; public: - ModuleCBan(Server* Me) : Module::Module(Me) + ModuleCBan(InspIRCd* Me) : Module::Module(Me) { - Srv = Me; - mycommand = new cmd_cban(Srv); + + mycommand = new cmd_cban(Me); Srv->AddCommand(mycommand); } @@ -271,7 +272,7 @@ class ModuleCBanFactory : public ModuleFactory { } - virtual Module * CreateModule(Server* Me) + virtual Module * CreateModule(InspIRCd* Me) { return new ModuleCBan(Me); } |