-/* +------------------------------------+\r * | Inspire Internet Relay Chat Daemon |\r * +------------------------------------+\r *\r * InspIRCd: (C) 2002-2007 InspIRCd Development Team\r * See: http://www.inspircd.org/wiki/index.php/Credits\r *\r * This program is free but copyrighted software; see\r * the file COPYING for details.\r *\r * ---------------------------------------------------\r */\r\r#include "inspircd.h"\r#include "users.h"\r#include "channels.h"\r#include "modules.h"\r\r/* $ModDesc: Provides a pointless /dalinfo command, demo module */\r\r/** Handle /DALINFO\r */\rclass cmd_dalinfo : public command_t\r{\r public:\r /* Command 'dalinfo', takes no parameters and needs no special modes */\r cmd_dalinfo (InspIRCd* Instance) : command_t(Instance,"DALINFO", 0, 0)\r {\r this->source = "m_testcommand.so";\r }\r\r CmdResult Handle (const char** parameters, int pcnt, userrec *user)\r {\r user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick);\r return CMD_FAILURE;\r }\r};\r\rclass ModuleTestCommand : public Module\r{\r cmd_dalinfo* newcommand;\r public:\r ModuleTestCommand(InspIRCd* Me)\r : Module(Me)\r {\r // Create a new command\r newcommand = new cmd_dalinfo(ServerInstance);\r ServerInstance->AddCommand(newcommand);\r }\r\r void Implements(char* List)\r {\r }\r\r virtual ~ModuleTestCommand()\r {\r delete newcommand;\r }\r\r virtual Version GetVersion()\r {\r return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION);\r }\r};\r\rMODULE_INIT(ModuleTestCommand)\r\r
\ No newline at end of file
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd: (C) 2002-2009 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.
+ *
+ * ---------------------------------------------------
+ */
+
+#include "inspircd.h"
+
+/* $ModDesc: Provides a pointless /dalinfo command, demo module */
+
+/** Handle /DALINFO
+ */
+class CommandDalinfo : public Command
+{
+ public:
+ /* Command 'dalinfo', takes no parameters and needs no special modes */
+ CommandDalinfo (InspIRCd* Instance) : Command(Instance,"DALINFO", 0, 0)
+ {
+ this->source = "m_testcommand.so";
+ }
+
+ CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
+ {
+ user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick.c_str());
+ return CMD_FAILURE;
+ }
+};
+
+class ModuleTestCommand : public Module
+{
+ CommandDalinfo* newcommand;
+ public:
+ ModuleTestCommand(InspIRCd* Me)
+ : Module(Me)
+ {
+ // Create a new command
+ newcommand = new CommandDalinfo(ServerInstance);
+ ServerInstance->AddCommand(newcommand);
+
+ }
+
+
+ virtual ~ModuleTestCommand()
+ {
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version("$Id$", VF_VENDOR, API_VERSION);
+ }
+};
+
+MODULE_INIT(ModuleTestCommand)
+