X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_randquote.cpp;h=12049b376fef5aa73d0e7e2c2fb951cf3bdedb85;hb=2330fc9ddd48c939e894e7e37e9bb2e62eafc38d;hp=7dfd44da307499734a73abffe440211ee345bb8b;hpb=e2e581f0d3d5d844dc4b5210f566e5a5571a0570;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index 7dfd44da3..12049b376 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -41,7 +41,7 @@ class cmd_randquote : public command_t this->source = "m_randquote.so"; } - void Handle (char** parameters, int pcntl, userrec *user) + void Handle (const char** parameters, int pcntl, userrec *user) { std::string str; int fsize; @@ -69,7 +69,7 @@ class RandquoteException : public ModuleException public: RandquoteException(std::string message) : err(message) { } - virtual char* GetReason() + virtual const char* GetReason() { return (char*)err.c_str(); } @@ -99,7 +99,7 @@ class ModuleRandQuote : public Module { RandquoteException e("m_randquote: Quotefile not specified - Please check your config."); throw(e); - } + } quotes = new FileReader(q_file); if(!quotes->Exists()) @@ -122,8 +122,8 @@ class ModuleRandQuote : public Module virtual ~ModuleRandQuote() { - delete conf; - delete quotes; + DELETE(conf); + DELETE(quotes); } virtual Version GetVersion()