]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_helpop.cpp
Mode +b stuff, probably wont work yet
[user/henk/code/inspircd.git] / src / modules / m_helpop.cpp
index c76046727ae1e4636cb0a2dfc8e64c4ec892aad1..b6c723ca79e1cd126a1054d90cc1d39322497bf5 100644 (file)
@@ -34,7 +34,7 @@ void sendtohelpop(userrec*, int, char**);
 class cmd_helpop : public command_t
 {
  public:
-        cmd_helpop () : command_t("HELPOP",0,0)
+        cmd_helpop () : command_t("HELPOP",0,1)
         {
                 this->source = "m_helpop.so";
         }
@@ -107,7 +107,7 @@ bool do_helpop(char **parameters, int pcnt, userrec *src)
        char a[MAXBUF];
        int nlines = 0;
 
-       if (!parameters)
+       if (!pcnt)
        {
                search = "start";
        }
@@ -160,7 +160,7 @@ class HelpopException : public ModuleException
        std::string err;
  public:
        HelpopException(std::string message) : err(message) { }
-       virtual char* GetReason() { return (char*)err.c_str(); }
+       virtual const char* GetReason() { return err.c_str(); }
 };
 
 class ModuleHelpop : public Module
@@ -216,9 +216,9 @@ class ModuleHelpop : public Module
 
                virtual void OnRehash(const std::string &parameter)
                {
-                       delete conf;
+                       DELETE(conf);
                        if (helpop)
-                               delete helpop;
+                               DELETE(helpop);
 
                        ReadConfig();
                }
@@ -242,8 +242,8 @@ class ModuleHelpop : public Module
 
                virtual ~ModuleHelpop()
                {
-                       delete conf;
-                       delete helpop;
+                       DELETE(conf);
+                       DELETE(helpop);
                }
        
                virtual Version GetVersion()