X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showwhois.cpp;h=0719a93f83a7641843e5d8b68e60e3ad143ef863;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=1343e665fc419c5635ee157c199336e73948fc92;hpb=09afa5085614e0224a296abd082fce205003c3fe;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 1343e665f..0719a93f8 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -6,15 +6,17 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" -#include "helperfuncs.h" + #include "inspircd.h" /* $ModDesc: Allows opers to set +W to see when a user uses WHOIS on them */ + + class SeeWhois : public ModeHandler { public: - SeeWhois() : ModeHandler('W', 0, 0, false, MODETYPE_CHANNEL, false) { } + SeeWhois(InspIRCd* Instance) : ModeHandler(Instance, 'W', 0, 0, false, MODETYPE_CHANNEL, false) { } ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { @@ -45,16 +47,16 @@ class SeeWhois : public ModeHandler class ModuleShowwhois : public Module { - Server* Srv; + SeeWhois* sw; public: - ModuleShowwhois(Server* Me) : Module::Module(Me) + ModuleShowwhois(InspIRCd* Me) : Module::Module(Me) { - Srv = Me; - sw = new SeeWhois(); - Srv->AddMode(sw, 'W'); + + sw = new SeeWhois(ServerInstance); + ServerInstance->AddMode(sw, 'W'); } ~ModuleShowwhois() @@ -93,7 +95,7 @@ class ModuleShowwhoisFactory : public ModuleFactory { } - virtual Module* CreateModule(Server* Me) + virtual Module* CreateModule(InspIRCd* Me) { return new ModuleShowwhois(Me); }