summaryrefslogtreecommitdiff
path: root/src/modules/m_showwhois.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_showwhois.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_showwhois.cpp')
-rw-r--r--src/modules/m_showwhois.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 7464a0d21..bbc89a2b4 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -20,7 +20,7 @@
class SeeWhois : public ModeHandler
{
public:
- SeeWhois(InspIRCd* Instance, bool IsOpersOnly) : ModeHandler(Instance, 'W', 0, 0, false, MODETYPE_USER, IsOpersOnly) { }
+ SeeWhois(InspIRCd* Instance, Module* Creator, bool IsOpersOnly) : ModeHandler(Instance, Creator, 'W', 0, 0, false, MODETYPE_USER, IsOpersOnly) { }
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
{
@@ -48,9 +48,8 @@ class SeeWhois : public ModeHandler
class WhoisNoticeCmd : public Command
{
public:
- WhoisNoticeCmd(InspIRCd* Instance) : Command(Instance,"WHOISNOTICE", 0, 1)
+ WhoisNoticeCmd(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"WHOISNOTICE", 0, 1)
{
- this->source = "m_showwhois.cpp";
}
void HandleFast(User* dest, User* src)
@@ -79,13 +78,13 @@ class ModuleShowwhois : public Module
public:
- ModuleShowwhois(InspIRCd* Me) : Module(Me), cmd(Me)
+ ModuleShowwhois(InspIRCd* Me) : Module(Me), cmd(Me, this)
{
ConfigReader conf(ServerInstance);
bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", "yes", 0);
ShowWhoisFromOpers = conf.ReadFlag("showwhois", "showfromopers", "yes", 0);
- sw = new SeeWhois(ServerInstance, OpersOnly);
+ sw = new SeeWhois(ServerInstance, this, OpersOnly);
if (!ServerInstance->Modes->AddMode(sw))
throw ModuleException("Could not add new modes!");
ServerInstance->AddCommand(&cmd);