]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_randquote.cpp
Add config <options:disablehmac> to support disabling of HMAC, and tidy up to detect...
[user/henk/code/inspircd.git] / src / modules / m_randquote.cpp
index 3163d37a0faed9be7fbe1987c86acbd5483f1a0f..034bea0408c2951a814aad851a4fcc70d60cdd79 100644 (file)
@@ -2,20 +2,15 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
@@ -31,10 +26,12 @@ std::string suffix = "";
 
 /* $ModDesc: Provides random Quotes on Connect. */
 
+/** Handle /RANDQUOTE
+ */
 class cmd_randquote : public command_t
 {
  public:
- cmd_randquote (InspIRCd* Instance) : command_t(Instance,"RANDQUOTE", 0, 0)
      cmd_randquote (InspIRCd* Instance) : command_t(Instance,"RANDQUOTE", 0, 0)
        {
                this->source = "m_randquote.so";
        }
@@ -59,16 +56,20 @@ class cmd_randquote : public command_t
        }
 };
 
+/** Thrown by m_randquote
+ */
 class RandquoteException : public ModuleException
 {
  private:
-       std::string err;
+       const std::string err;
  public:
-       RandquoteException(std::string message) : err(message) { }
+       RandquoteException(const std::string &message) : err(message) { }
+
+       ~RandquoteException() throw () { }
 
        virtual const char* GetReason()
        {
-               return (char*)err.c_str();
+               return err.c_str();
        }
 };
 
@@ -125,7 +126,7 @@ class ModuleRandQuote : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
        
        virtual void OnUserConnect(userrec* user)