]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_helpop.cpp
Don't send an override notice if no modes were actually applied, thanks Ankit.
[user/henk/code/inspircd.git] / src / modules / m_helpop.cpp
index a7f9e400710a1a7740293e9a9607277755c4c703..9c7d409a8be93acd496b6cce7662c3536d6ddb87 100644 (file)
@@ -48,7 +48,7 @@ class CommandHelpop : public Command
                        user->WriteServ("NOTICE %s :HELPOP topic index", user->nick.c_str());
                        for (std::map<irc::string, std::string>::iterator iter = helpop_map.begin(); iter != helpop_map.end(); iter++)
                        {
-                               user->WriteServ("NOTICE %s :    %s", user->nick.c_str(), iter->first.c_str());                          
+                               user->WriteServ("NOTICE %s :    %s", user->nick.c_str(), iter->first.c_str());
                        }
                        user->WriteServ("NOTICE %s :*** End of HELPOP topic index", user->nick.c_str());
                }
@@ -103,14 +103,14 @@ class ModuleHelpop : public Module
 
                virtual void ReadConfig()
                {
-                       ConfigReader *MyConf = new ConfigReader(ServerInstance);
+                       ConfigReader MyConf(ServerInstance);
 
                        helpop_map.clear();
 
-                       for (int i = 0; i < MyConf->Enumerate("helpop"); i++)
+                       for (int i = 0; i < MyConf.Enumerate("helpop"); i++)
                        {
-                               irc::string key = assign(MyConf->ReadValue("helpop", "key", i));
-                               std::string value = MyConf->ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */
+                               irc::string key = assign(MyConf.ReadValue("helpop", "key", i));
+                               std::string value = MyConf.ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */
 
                                if (key == "index")
                                {
@@ -152,10 +152,10 @@ class ModuleHelpop : public Module
                        ServerInstance->Modes->DelMode(ho);
                        delete ho;
                }
-       
+
                virtual Version GetVersion()
                {
-                       return Version(1,2,0,1,VF_COMMON|VF_VENDOR,API_VERSION);
+                       return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
                }
 };