]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_randquote.cpp
there were two.. yes, you're right Special
[user/henk/code/inspircd.git] / src / modules / m_randquote.cpp
index a720be52244535c7b32df5dfcc9caae2032ca2a2..2ad7831ce90f0f5aba9e3a1b6d32c9b362b92f39 100644 (file)
@@ -18,9 +18,9 @@
 
 static FileReader *quotes = NULL;
 
-std::string q_file = "";
-std::string prefix = "";
-std::string suffix = "";
+std::string q_file;
+std::string prefix;
+std::string suffix;
 
 /* $ModDesc: Provides random Quotes on Connect. */
 
@@ -39,7 +39,7 @@ class cmd_randquote : public command_t
                std::string str;
                int fsize;
 
-               if (q_file == "" || quotes->Exists())
+               if (q_file.empty() || quotes->Exists())
                {
                        fsize = quotes->FileSize();
                        str = quotes->GetLine(rand() % fsize);
@@ -92,7 +92,7 @@ class ModuleRandQuote : public Module
 
                mycommand = NULL;
 
-               if (q_file == "")
+               if (q_file.empty())
                {
                        RandquoteException e("m_randquote: Quotefile not specified - Please check your config.");
                        throw(e);
@@ -135,27 +135,4 @@ class ModuleRandQuote : public Module
        }
 };
 
-
-class ModuleRandQuoteFactory : public ModuleFactory
-{
- public:
-       ModuleRandQuoteFactory()
-       {
-       }
-       
-       ~ModuleRandQuoteFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleRandQuote(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleRandQuoteFactory;
-}
+MODULE_INIT(ModuleRandQuote)