]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_randquote.cpp
fix some unitialised vectors and tidy up a bit.
[user/henk/code/inspircd.git] / src / modules / m_randquote.cpp
index 1c794f7dd88737a31cb851db63f0065c8b3d0a01..38c11ff959a110dcf80aee6cf8501d3b6dba0b0d 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 std::vector<std::string>& parameters, User *user)
        {
                std::string str;
                int fsize;
@@ -74,15 +74,13 @@ class ModuleRandQuote : public Module
 
                if (q_file.empty())
                {
-                       CoreException e("m_randquote: Quotefile not specified - Please check your config.");
-                       throw(e);
+                       throw ModuleException("m_randquote: Quotefile not specified - Please check your config.");
                }
 
                quotes = new FileReader(ServerInstance, q_file);
                if(!quotes->Exists())
                {
-                       CoreException e("m_randquote: QuoteFile not Found!! Please check your config - module will not function.");
-                       throw(e);
+                       throw ModuleException("m_randquote: QuoteFile not Found!! Please check your config - module will not function.");
                }
                else
                {
@@ -103,13 +101,13 @@ 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)
        {
                if (mycommand)
-                       mycommand->Handle(NULL, 0, user);
+                       mycommand->Handle(std::vector<std::string>(), user);
        }
 };