* | 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"
/* $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";
}
}
};
+/** 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();
}
};
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)