]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Flexible SendQ
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index c6e9ed27ce1a3b6fc0d27eb9664f3bdfc7616ed7..9acc019aadc1cc62eeee8ed86ef6d3e29f8dc965 100644 (file)
 class SeeWhois : public ModeHandler
 {
  public:
-       SeeWhois(InspIRCd* Instance, Module* Creator, bool IsOpersOnly) : ModeHandler(Instance, Creator, 'W', 0, 0, false, MODETYPE_USER, IsOpersOnly) { }
+       SeeWhois(Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, 'W', PARAM_NONE, MODETYPE_USER)
+       {
+               oper = IsOpersOnly;
+       }
 
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
@@ -48,7 +51,7 @@ class SeeWhois : public ModeHandler
 class WhoisNoticeCmd : public Command
 {
  public:
-       WhoisNoticeCmd(InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"WHOISNOTICE", 0, 1)
+       WhoisNoticeCmd(Module* Creator) : Command(Creator,"WHOISNOTICE", 1)
        {
        }
 
@@ -78,13 +81,13 @@ class ModuleShowwhois : public Module
 
  public:
 
-       ModuleShowwhois(InspIRCd* Me) : Module(Me), cmd(Me, this)
+       ModuleShowwhois() : cmd(this)
        {
-               ConfigReader conf(ServerInstance);
+               ConfigReader conf;
                bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", "yes", 0);
                ShowWhoisFromOpers = conf.ReadFlag("showwhois", "showfromopers", "yes", 0);
 
-               sw = new SeeWhois(ServerInstance, this, OpersOnly);
+               sw = new SeeWhois(this, OpersOnly);
                if (!ServerInstance->Modes->AddMode(sw))
                        throw ModuleException("Could not add new modes!");
                ServerInstance->AddCommand(&cmd);
@@ -100,7 +103,7 @@ class ModuleShowwhois : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$",VF_COMMON|VF_VENDOR,API_VERSION);
+               return Version("Allows opers to set +W to see when a user uses WHOIS on them",VF_COMMON|VF_VENDOR,API_VERSION);
        }
 
        virtual void OnWhois(User* source, User* dest)