summaryrefslogtreecommitdiff
path: root/src/modules/m_cap.cpp
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_cap.cpp
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_cap.cpp')
-rw-r--r--src/modules/m_cap.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 2e9a24811..2b700a5ae 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -34,11 +34,9 @@ CAP END
*/
class CommandCAP : public Command
{
- Module* Creator;
public:
- CommandCAP (InspIRCd* Instance, Module* mod) : Command(Instance,"CAP", 0, 1, true), Creator(mod)
+ CommandCAP (InspIRCd* Instance, Module* mod) : Command(Instance, mod, "CAP", 0, 1, true)
{
- this->source = "m_cap.so";
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -51,7 +49,7 @@ class CommandCAP : public Command
Data.type = subcommand;
Data.user = user;
- Data.creator = this->Creator;
+ Data.creator = this->creator;
if (parameters.size() < 2)
return CMD_FAILURE;
@@ -67,7 +65,7 @@ class CommandCAP : public Command
}
user->Extend("CAP_REGHOLD");
- Event event((char*) &Data, (Module*)this->Creator, "cap_req");
+ Event event((char*) &Data, this->creator, "cap_req");
event.Send(this->ServerInstance);
if (Data.ack.size() > 0)
@@ -92,10 +90,10 @@ class CommandCAP : public Command
Data.type = subcommand;
Data.user = user;
- Data.creator = this->Creator;
+ Data.creator = this->creator;
user->Extend("CAP_REGHOLD");
- Event event((char*) &Data, (Module*)this->Creator, subcommand == "LS" ? "cap_ls" : "cap_list");
+ Event event((char*) &Data, this->creator, subcommand == "LS" ? "cap_ls" : "cap_list");
event.Send(this->ServerInstance);
std::string Result;
@@ -112,10 +110,10 @@ class CommandCAP : public Command
Data.type = subcommand;
Data.user = user;
- Data.creator = this->Creator;
+ Data.creator = this->creator;
user->Extend("CAP_REGHOLD");
- Event event((char*) &Data, (Module*)this->Creator, "cap_clear");
+ Event event((char*) &Data, this->creator, "cap_clear");
event.Send(this->ServerInstance);
std::string Result = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined();