]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_randquote.cpp
DOH! Fix my muppetry of a segfault, and fix some warnings
[user/henk/code/inspircd.git] / src / modules / m_randquote.cpp
index 7dd3303a844de6cba7f2054052636337787e913c..02572e7de437e6e0e4bbb2d524c8b87db03c6d52 100644 (file)
@@ -31,7 +31,7 @@ class CommandRandquote : public Command
                this->source = "m_randquote.so";
        }
 
-       CmdResult Handle (const char** parameters, int pcntl, User *user)
+       CmdResult Handle (const char* const* parameters, int pcntl, User *user)
        {
                std::string str;
                int fsize;
@@ -52,23 +52,6 @@ class CommandRandquote : public Command
        }
 };
 
-/** Thrown by m_randquote
- */
-class RandquoteException : public ModuleException
-{
- private:
-       const std::string err;
- public:
-       RandquoteException(const std::string &message) : err(message) { }
-
-       ~RandquoteException() throw () { }
-
-       virtual const char* GetReason()
-       {
-               return err.c_str();
-       }
-};
-
 class ModuleRandQuote : public Module
 {
  private:
@@ -91,14 +74,14 @@ class ModuleRandQuote : public Module
 
                if (q_file.empty())
                {
-                       RandquoteException e("m_randquote: Quotefile not specified - Please check your config.");
+                       CoreException e("m_randquote: Quotefile not specified - Please check your config.");
                        throw(e);
                }
 
                quotes = new FileReader(ServerInstance, q_file);
                if(!quotes->Exists())
                {
-                       RandquoteException e("m_randquote: QuoteFile not Found!! Please check your config - module will not function.");
+                       CoreException e("m_randquote: QuoteFile not Found!! Please check your config - module will not function.");
                        throw(e);
                }
                else
@@ -120,7 +103,7 @@ class ModuleRandQuote : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
        
        virtual void OnUserConnect(User* user)