summaryrefslogtreecommitdiff
path: root/src/modules/m_cap.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:32:27 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:32:27 +0000
commit069a2ef21425007d092342c8c11ec28da2f410d7 (patch)
tree30df16dcbf75bdeede41de270efcb055e0415617 /src/modules/m_cap.cpp
parentca1b136b306784191235a6579da59f7e862003d1 (diff)
Clean up Command constructor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11707 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cap.cpp')
-rw-r--r--src/modules/m_cap.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 160c7a9c9..355c6d0fb 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -36,9 +36,10 @@ class CommandCAP : public Command
{
public:
LocalIntExt reghold;
- CommandCAP (InspIRCd* Instance, Module* mod) : Command(Instance, mod, "CAP", 0, 1, true),
+ CommandCAP (Module* mod) : Command(mod, "CAP", 1),
reghold("CAP_REGHOLD", mod)
{
+ works_before_reg = true;
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -68,7 +69,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, "cap_req");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
if (Data.ack.size() > 0)
{
@@ -96,7 +97,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, subcommand == "LS" ? "cap_ls" : "cap_list");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
std::string Result;
if (Data.wanted.size() > 0)
@@ -116,7 +117,7 @@ class CommandCAP : public Command
reghold.set(user, 1);
Event event((char*) &Data, this->creator, "cap_clear");
- event.Send(this->ServerInstance);
+ event.Send(ServerInstance);
std::string Result = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined();
user->WriteServ("CAP * ACK :%s", Result.c_str());
@@ -135,7 +136,7 @@ class ModuleCAP : public Module
CommandCAP cmd;
public:
ModuleCAP(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ : Module(Me), cmd(this)
{
ServerInstance->AddCommand(&cmd);
Extensible::Register(&cmd.reghold);