]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hidechans.cpp
...because every now and again, i have to do a massive commit.
[user/henk/code/inspircd.git] / src / modules / m_hidechans.cpp
index 6c3dba88ff5ac3d1edd1db3c33dd7a779d0b001a..b8c3be4719abd1302f51eb0f00f08df694642814 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -20,7 +20,7 @@
 class HideChans : public ModeHandler
 {
  public:
-       HideChans(InspIRCd* Instance, Module* Creator) : ModeHandler(Creator, 'I', PARAM_NONE, MODETYPE_USER) { }
+       HideChans(Module* Creator) : ModeHandler(Creator, "hidechans", 'I', PARAM_NONE, MODETYPE_USER) { }
 
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
@@ -50,7 +50,7 @@ class ModuleHideChans : public Module
        bool AffectsOpers;
        HideChans hm;
  public:
-       ModuleHideChans(InspIRCd* Me) : Module(Me), hm(Me, this)
+       ModuleHideChans() : hm(this)
        {
                if (!ServerInstance->Modes->AddMode(&hm))
                        throw ModuleException("Could not add new modes!");
@@ -61,17 +61,16 @@ class ModuleHideChans : public Module
 
        virtual ~ModuleHideChans()
        {
-               ServerInstance->Modes->DelMode(&hm);
        }
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for hiding channels with user mode +I", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for hiding channels with user mode +I", VF_COMMON | VF_VENDOR);
        }
 
        virtual void OnRehash(User* user)
        {
-               ConfigReader conf(ServerInstance);
+               ConfigReader conf;
                AffectsOpers = conf.ReadFlag("hidechans", "affectsopers", 0);
        }