summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command_parse.h55
-rw-r--r--include/commands/cmd_admin.h40
-rw-r--r--include/commands/cmd_away.h42
-rw-r--r--include/commands/cmd_clearcache.h41
-rw-r--r--include/commands/cmd_commands.h42
-rw-r--r--include/commands/cmd_connect.h42
-rw-r--r--include/commands/cmd_die.h42
-rw-r--r--include/commands/cmd_eline.h42
-rw-r--r--include/commands/cmd_gline.h42
-rw-r--r--include/commands/cmd_info.h42
-rw-r--r--include/commands/cmd_invite.h42
-rw-r--r--include/commands/cmd_ison.h42
-rw-r--r--include/commands/cmd_join.h42
-rw-r--r--include/commands/cmd_kick.h42
-rw-r--r--include/commands/cmd_kill.h42
-rw-r--r--include/commands/cmd_kline.h42
-rw-r--r--include/commands/cmd_links.h42
-rw-r--r--include/commands/cmd_list.h42
-rw-r--r--include/commands/cmd_loadmodule.h42
-rw-r--r--include/commands/cmd_lusers.h42
-rw-r--r--include/commands/cmd_map.h42
-rw-r--r--include/commands/cmd_mode.h41
-rw-r--r--include/commands/cmd_modules.h42
-rw-r--r--include/commands/cmd_motd.h45
-rw-r--r--include/commands/cmd_names.h42
-rw-r--r--include/commands/cmd_nick.h50
-rw-r--r--include/commands/cmd_notice.h42
-rw-r--r--include/commands/cmd_oper.h44
-rw-r--r--include/commands/cmd_part.h42
-rw-r--r--include/commands/cmd_pass.h45
-rw-r--r--include/commands/cmd_ping.h42
-rw-r--r--include/commands/cmd_pong.h43
-rw-r--r--include/commands/cmd_privmsg.h42
-rw-r--r--include/commands/cmd_qline.h42
-rw-r--r--include/commands/cmd_quit.h42
-rw-r--r--include/commands/cmd_rehash.h42
-rw-r--r--include/commands/cmd_reloadmodule.h42
-rw-r--r--include/commands/cmd_restart.h45
-rw-r--r--include/commands/cmd_rules.h45
-rw-r--r--include/commands/cmd_server.h42
-rw-r--r--include/commands/cmd_squit.h45
-rw-r--r--include/commands/cmd_stats.h45
-rw-r--r--include/commands/cmd_time.h42
-rw-r--r--include/commands/cmd_topic.h42
-rw-r--r--include/commands/cmd_trace.h42
-rw-r--r--include/commands/cmd_unloadmodule.h42
-rw-r--r--include/commands/cmd_user.h42
-rw-r--r--include/commands/cmd_userhost.h42
-rw-r--r--include/commands/cmd_version.h42
-rw-r--r--include/commands/cmd_wallops.h42
-rw-r--r--include/commands/cmd_who.h58
-rw-r--r--include/commands/cmd_whois.h45
-rw-r--r--include/commands/cmd_whowas.h2
-rw-r--r--include/commands/cmd_zline.h42
-rw-r--r--include/inspircd.h24
-rw-r--r--include/modules.h2
56 files changed, 28 insertions, 2283 deletions
diff --git a/include/command_parse.h b/include/command_parse.h
index f176394a7..7ee0e8a07 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -47,24 +47,6 @@ class CoreExport CommandParser : public classbase
*/
bool ProcessCommand(User *user, std::string &cmd);
- /** Finds the init_command symbol in a .so file
- * @param v A function pointer to be initialized
- * @param h A valid shared object handle
- * @param name The filename being loaded, used for error reporting
- * @return True if the symbol could be found
- */
- bool FindSym(void** v, void* h, const std::string &name);
-
- /** A list of core-implemented modes and their shared object handles
- */
- SharedObjectList RFCCommands;
-
- /** Load a command from a shared object on disk.
- * @param name The shared object to load (without path)
- * @return NULL on success, pointer to dlerrr() error message on failure
- */
- const char* LoadCommand(const char* name);
-
/** Removes a command if the sources match. Used as a helper for
* safe hash_map delete while iter in RemoveCommands(const char* source).
*/
@@ -76,16 +58,6 @@ class CoreExport CommandParser : public classbase
*/
Commandtable cmdlist;
- /** Reload a core command.
- * This will only reload commands implemented by the core,
- * to reload a modular command, you must reload that module.
- * @param cmd The command to reload. This will cause the shared
- * object which implements this command to be closed, and then reloaded.
- * @return True if the command was reloaded, false if it could not be found
- * or another error occured
- */
- bool ReloadCommand(std::string cmd, User* user);
-
/** Default constructor.
* @param Instance The creator of this class
*/
@@ -182,22 +154,11 @@ class CoreExport CommandParser : public classbase
*/
void RemoveCommands(Module* source);
- /** Remove all core commands and unload their shared objects
- */
- void RemoveRFCCommands();
-
/** Add a new command to the commands hash
* @param f The new Command to add to the list
- * @param so_handle The handle to the shared object where the command can be found.
- * Only core commands loaded via cmd_*.so files should set this parameter to anything
- * meaningful. Module authors should leave this parameter at its default of NULL.
* @return True if the command was added
*/
- bool CreateCommand(Command *f, void* so_handle = NULL);
-
- /** Insert the default RFC1459 commands into the command hash.
- */
- void SetupCommandTable();
+ bool CreateCommand(Command *f);
/** Translate nicknames in a string into UIDs, based on the TranslationType given.
* @param to The translation type to use for the process.
@@ -218,20 +179,6 @@ class CoreExport CommandParser : public classbase
int TranslateUIDs(const std::vector<TranslateType> to, const std::vector<std::string> &source, std::string &dest, bool prefix_final = false, Command* custom_translator = NULL);
};
-/** Command handler class for the RELOAD command.
- * A command cant really reload itself, so this has to be in here.
- */
-class CommandReload : public Command
-{
- public:
- /** Standard constructor
- */
- CommandReload (InspIRCd* Instance) : Command(Instance,NULL,"RELOAD","o",1) { syntax = "<core-command>"; }
- /** Handle RELOAD
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
/** A lookup table of values for multiplier characters used by
* InspIRCd::Duration(). In this lookup table, the indexes for
* the ascii values 'm' and 'M' have the value '60', the indexes
diff --git a/include/commands/cmd_admin.h b/include/commands/cmd_admin.h
deleted file mode 100644
index b82331c39..000000000
--- a/include/commands/cmd_admin.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ADMIN_H__
-#define __CMD_ADMIN_H__
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /ADMIN. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandAdmin : public Command
-{
- public:
- /** Constructor for admin.
- */
- CommandAdmin (InspIRCd* Instance) : Command(Instance,NULL,"ADMIN",0,0) { syntax = "[<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_away.h b/include/commands/cmd_away.h
deleted file mode 100644
index 9cde32f57..000000000
--- a/include/commands/cmd_away.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_AWAY_H__
-#define __CMD_AWAY_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /AWAY. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandAway : public Command
-{
- public:
- /** Constructor for away.
- */
- CommandAway (InspIRCd* Instance) : Command(Instance,NULL,"AWAY",0,0) { syntax = "[<message>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_clearcache.h b/include/commands/cmd_clearcache.h
deleted file mode 100644
index 00e41fce9..000000000
--- a/include/commands/cmd_clearcache.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ADMIN_H__
-#define __CMD_ADMIN_H__
-
-#include "users.h"
-#include "channels.h"
-#include "ctables.h"
-
-/** Handle /ADMIN. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandClearcache : public Command
-{
- public:
- /** Constructor for clearcache.
- */
- CommandClearcache (InspIRCd* Instance) : Command(Instance,NULL,"CLEARCACHE","o",0) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_commands.h b/include/commands/cmd_commands.h
deleted file mode 100644
index 13c5ee075..000000000
--- a/include/commands/cmd_commands.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_COMMANDS_H__
-#define __CMD_COMMANDS_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /COMMANDS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandCommands : public Command
-{
- public:
- /** Constructor for commands.
- */
- CommandCommands (InspIRCd* Instance) : Command(Instance,NULL,"COMMANDS",0,0) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_connect.h b/include/commands/cmd_connect.h
deleted file mode 100644
index 208844661..000000000
--- a/include/commands/cmd_connect.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_CONNECT_H__
-#define __CMD_CONNECT_H__
-
-#include "users.h"
-#include "channels.h"
-#include "ctables.h"
-#include "modules.h"
-
-/** Handle /CONNECT. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandConnect : public Command
-{
- public:
- /** Constructor for connect.
- */
- CommandConnect (InspIRCd* Instance) : Command(Instance,NULL,"CONNECT","o",1,false,0) { syntax = "<servername> [<remote-server>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_die.h b/include/commands/cmd_die.h
deleted file mode 100644
index 156a1508e..000000000
--- a/include/commands/cmd_die.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_DIE_H__
-#define __CMD_DIE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /DIE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandDie : public Command
-{
- public:
- /** Constructor for die.
- */
- CommandDie (InspIRCd* Instance) : Command(Instance,NULL,"DIE","o",1,false,0) { syntax = "<password>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_eline.h b/include/commands/cmd_eline.h
deleted file mode 100644
index 2ac9adeab..000000000
--- a/include/commands/cmd_eline.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ELINE_H__
-#define __CMD_ELINE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /ELINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandEline : public Command
-{
- public:
- /** Constructor for eline.
- */
- CommandEline (InspIRCd* Instance) : Command(Instance,NULL,"ELINE","o",1,3,false,0) { syntax = "<ident@host> [<duration> :<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_gline.h b/include/commands/cmd_gline.h
deleted file mode 100644
index 9548279d4..000000000
--- a/include/commands/cmd_gline.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_GLINE_H__
-#define __CMD_GLINE_H__
-
-// include the common header file
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /GLINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandGline : public Command
-{
- public:
- /** Constructor for gline.
- */
- CommandGline (InspIRCd* Instance) : Command(Instance,NULL,"GLINE","o",1,3,false,0) { syntax = "<ident@host> [<duration> :<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_info.h b/include/commands/cmd_info.h
deleted file mode 100644
index 85d7d4c84..000000000
--- a/include/commands/cmd_info.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_INFO_H__
-#define __CMD_INFO_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /INFO. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandInfo : public Command
-{
- public:
- /** Constructor for info.
- */
- CommandInfo (InspIRCd* Instance) : Command(Instance,NULL,"INFO",0,0) { syntax = "[<servermask>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_invite.h b/include/commands/cmd_invite.h
deleted file mode 100644
index ce048e712..000000000
--- a/include/commands/cmd_invite.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_INVITE_H__
-#define __CMD_INVITE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /INVITE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandInvite : public Command
-{
- public:
- /** Constructor for invite.
- */
- CommandInvite (InspIRCd* Instance) : Command(Instance,NULL,"INVITE", 0, 0, false, 4) { syntax = "[<nick> <channel>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_ison.h b/include/commands/cmd_ison.h
deleted file mode 100644
index 93f3356d8..000000000
--- a/include/commands/cmd_ison.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ISON_H__
-#define __CMD_ISON_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /ISON. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandIson : public Command
-{
- public:
- /** Constructor for ison.
- */
- CommandIson (InspIRCd* Instance) : Command(Instance,NULL,"ISON",0,0) { syntax = "<nick> {nick}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_join.h b/include/commands/cmd_join.h
deleted file mode 100644
index 2ea32de1a..000000000
--- a/include/commands/cmd_join.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_JOIN_H__
-#define __CMD_JOIN_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /JOIN. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandJoin : public Command
-{
- public:
- /** Constructor for join.
- */
- CommandJoin (InspIRCd* Instance) : Command(Instance,NULL,"JOIN", 0, 1, false, 2) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_kick.h b/include/commands/cmd_kick.h
deleted file mode 100644
index be6a40b06..000000000
--- a/include/commands/cmd_kick.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_KICK_H__
-#define __CMD_KICK_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /KICK. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandKick : public Command
-{
- public:
- /** Constructor for kick.
- */
- CommandKick (InspIRCd* Instance) : Command(Instance,NULL,"KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_kill.h b/include/commands/cmd_kill.h
deleted file mode 100644
index 392975fab..000000000
--- a/include/commands/cmd_kill.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_KILL_H__
-#define __CMD_KILL_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /KILL. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandKill : public Command
-{
- public:
- /** Constructor for kill.
- */
- CommandKill (InspIRCd* Instance) : Command(Instance,NULL,"KILL","o",2,false,0) { syntax = "<nickname> <reason>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_kline.h b/include/commands/cmd_kline.h
deleted file mode 100644
index 5744de506..000000000
--- a/include/commands/cmd_kline.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_KLINE_H__
-#define __CMD_KLINE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /KLINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandKline : public Command
-{
- public:
- /** Constructor for kline.
- */
- CommandKline (InspIRCd* Instance) : Command(Instance,NULL,"KLINE","o",1,3,false,0) { syntax = "<ident@host> [<duration> :<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_links.h b/include/commands/cmd_links.h
deleted file mode 100644
index fbfdb6201..000000000
--- a/include/commands/cmd_links.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_LINKS_H__
-#define __CMD_LINKS_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /LINKS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandLinks : public Command
-{
- public:
- /** Constructor for links.
- */
- CommandLinks (InspIRCd* Instance) : Command(Instance,NULL,"LINKS",0,0) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_list.h b/include/commands/cmd_list.h
deleted file mode 100644
index 8801b8c39..000000000
--- a/include/commands/cmd_list.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_LIST_H__
-#define __CMD_LIST_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /LIST. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandList : public Command
-{
- public:
- /** Constructor for list.
- */
- CommandList (InspIRCd* Instance) : Command(Instance,NULL,"LIST", 0, 0, false, 5) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_loadmodule.h b/include/commands/cmd_loadmodule.h
deleted file mode 100644
index 9d31f072b..000000000
--- a/include/commands/cmd_loadmodule.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_LOADMODULE_H__
-#define __CMD_LOADMODULE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /LOADMODULE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandLoadmodule : public Command
-{
- public:
- /** Constructor for loadmodule.
- */
- CommandLoadmodule (InspIRCd* Instance) : Command(Instance,NULL,"LOADMODULE","o",1) { syntax = "<modulename>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_lusers.h b/include/commands/cmd_lusers.h
deleted file mode 100644
index 2c5d3d454..000000000
--- a/include/commands/cmd_lusers.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_LUSERS_H__
-#define __CMD_LUSERS_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /LUSERS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandLusers : public Command
-{
- public:
- /** Constructor for lusers.
- */
- CommandLusers (InspIRCd* Instance) : Command(Instance,NULL,"LUSERS",0,0) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_map.h b/include/commands/cmd_map.h
deleted file mode 100644
index 183d59751..000000000
--- a/include/commands/cmd_map.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_MAP_H__
-#define __CMD_MAP_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /MAP. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandMap : public Command
-{
- public:
- /** Constructor for map.
- */
- CommandMap (InspIRCd* Instance) : Command(Instance,NULL,"MAP",0,0,false,2) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_mode.h b/include/commands/cmd_mode.h
deleted file mode 100644
index 83ab00bba..000000000
--- a/include/commands/cmd_mode.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ADMIN_H__
-#define __CMD_ADMIN_H__
-
-#include "users.h"
-#include "channels.h"
-#include "ctables.h"
-
-/** Handle /MODE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandMode : public Command
-{
- public:
- /** Constructor for mode.
- */
- CommandMode (InspIRCd* Instance) : Command(Instance,NULL,"MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_modules.h b/include/commands/cmd_modules.h
deleted file mode 100644
index 18dc76cac..000000000
--- a/include/commands/cmd_modules.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_MODULES_H__
-#define __CMD_MODULES_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /MODULES. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandModules : public Command
-{
- public:
- /** Constructor for modules.
- */
- CommandModules (InspIRCd* Instance) : Command(Instance,NULL,"MODULES",0,0) { syntax = "[debug]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_motd.h b/include/commands/cmd_motd.h
deleted file mode 100644
index b57d851d9..000000000
--- a/include/commands/cmd_motd.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_MOTD_H__
-#define __CMD_MOTD_H__
-
-// include the common header files
-
-#include <string>
-#include <vector>
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-/** Handle /MOTD. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandMotd : public Command
-{
- public:
- /** Constructor for motd.
- */
- CommandMotd (InspIRCd* Instance) : Command(Instance,NULL,"MOTD",0,0) { syntax = "[<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_names.h b/include/commands/cmd_names.h
deleted file mode 100644
index 174b6aa20..000000000
--- a/include/commands/cmd_names.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_NAMES_H__
-#define __CMD_NAMES_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /NAMES. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandNames : public Command
-{
- public:
- /** Constructor for names.
- */
- CommandNames (InspIRCd* Instance) : Command(Instance,NULL,"NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_nick.h b/include/commands/cmd_nick.h
deleted file mode 100644
index b3a8e12a8..000000000
--- a/include/commands/cmd_nick.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_NICK_H__
-#define __CMD_NICK_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /NICK. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandNick : public Command
-{
- bool allowinvalid;
- public:
- /** Constructor for nick.
- */
- CommandNick (InspIRCd* Instance) : Command(Instance,NULL,"NICK", 0, 1, true, 3), allowinvalid(false) { syntax = "<newnick>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-
- /** Handle internal command
- * @param id Used to indicate if invalid nick changes are allowed.
- * Set to 1 to allow invalid nicks and 0 to deny them.
- * @param parameters Currently unused
- */
- CmdResult HandleInternal(const unsigned int id, const std::deque<classbase*> &parameters);
-};
-
-#endif
diff --git a/include/commands/cmd_notice.h b/include/commands/cmd_notice.h
deleted file mode 100644
index 580376f08..000000000
--- a/include/commands/cmd_notice.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_NOTICE_H__
-#define __CMD_NOTICE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /NOTICE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandNotice : public Command
-{
- public:
- /** Constructor for notice.
- */
- CommandNotice (InspIRCd* Instance) : Command(Instance,NULL,"NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_oper.h b/include/commands/cmd_oper.h
deleted file mode 100644
index dd0b6318d..000000000
--- a/include/commands/cmd_oper.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_OPER_H__
-#define __CMD_OPER_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-bool OneOfMatches(const char* host, const char* ip, const char* hostlist);
-
-/** Handle /OPER. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandOper : public Command
-{
- public:
- /** Constructor for oper.
- */
- CommandOper (InspIRCd* Instance) : Command(Instance,NULL,"OPER",0,2,false,2) { syntax = "<username> <password>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_part.h b/include/commands/cmd_part.h
deleted file mode 100644
index 01284ccbd..000000000
--- a/include/commands/cmd_part.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_PART_H__
-#define __CMD_PART_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /PART. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandPart : public Command
-{
- public:
- /** Constructor for part.
- */
- CommandPart (InspIRCd* Instance) : Command(Instance,NULL,"PART", 0, 1, false, 5) { syntax = "<channel>{,<channel>} [<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_pass.h b/include/commands/cmd_pass.h
deleted file mode 100644
index 21eb378ab..000000000
--- a/include/commands/cmd_pass.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_PASS_H__
-#define __CMD_PASS_H__
-
-// include the common header files
-
-#include <string>
-#include <vector>
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-/** Handle /PASS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandPass : public Command
-{
- public:
- /** Constructor for pass.
- */
- CommandPass (InspIRCd* Instance) : Command(Instance,NULL,"PASS",0,1,true,0) { syntax = "<password>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_ping.h b/include/commands/cmd_ping.h
deleted file mode 100644
index 56570d24e..000000000
--- a/include/commands/cmd_ping.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_PING_H__
-#define __CMD_PING_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /PING. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandPing : public Command
-{
- public:
- /** Constructor for ping.
- */
- CommandPing (InspIRCd* Instance) : Command(Instance,NULL,"PING", 0, 1, false, 0) { syntax = "<servername> [:<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_pong.h b/include/commands/cmd_pong.h
deleted file mode 100644
index 58d862a73..000000000
--- a/include/commands/cmd_pong.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_PONG_H__
-#define __CMD_PONG_H__
-
-// include the common header files
-
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-/** Handle /PONG. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandPong : public Command
-{
- public:
- /** Constructor for pong.
- */
- CommandPong (InspIRCd* Instance) : Command(Instance,NULL,"PONG", 0, 1, false, 0) { syntax = "<ping-text>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_privmsg.h b/include/commands/cmd_privmsg.h
deleted file mode 100644
index 74990983c..000000000
--- a/include/commands/cmd_privmsg.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_PRIVMSG_H__
-#define __CMD_PRIVMSG_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /PRIVMSG. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandPrivmsg : public Command
-{
- public:
- /** Constructor for privmsg.
- */
- CommandPrivmsg (InspIRCd* Instance) : Command(Instance,NULL,"PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_qline.h b/include/commands/cmd_qline.h
deleted file mode 100644
index 352ebddda..000000000
--- a/include/commands/cmd_qline.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_QLINE_H__
-#define __CMD_QLINE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /QLINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandQline : public Command
-{
- public:
- /** Constructor for qline.
- */
- CommandQline (InspIRCd* Instance) : Command(Instance,NULL,"QLINE","o",1,3,false,0) { syntax = "<nick> [<duration> :<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_quit.h b/include/commands/cmd_quit.h
deleted file mode 100644
index f1430e46b..000000000
--- a/include/commands/cmd_quit.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_QUIT_H__
-#define __CMD_QUIT_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /QUIT. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandQuit : public Command
-{
- public:
- /** Constructor for quit.
- */
- CommandQuit (InspIRCd* Instance) : Command(Instance,NULL,"QUIT",0,0,true) { syntax = "[<message>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_rehash.h b/include/commands/cmd_rehash.h
deleted file mode 100644
index 6c294ffb0..000000000
--- a/include/commands/cmd_rehash.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_REHASH_H__
-#define __CMD_REHASH_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /REHASH. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandRehash : public Command
-{
- public:
- /** Constructor for rehash.
- */
- CommandRehash (InspIRCd* Instance) : Command(Instance,NULL,"REHASH","o",0,false,3) { syntax = "[<servermask>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_reloadmodule.h b/include/commands/cmd_reloadmodule.h
deleted file mode 100644
index d75ec568f..000000000
--- a/include/commands/cmd_reloadmodule.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_RELOADMODULE_H__
-#define __CMD_RELOADMODULE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /RELOADMODULE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandReloadmodule : public Command
-{
- public:
- /** Constructor for reloadmodule.
- */
- CommandReloadmodule (InspIRCd* Instance) : Command(Instance,NULL,"RELOADMODULE","o",1) { syntax = "<modulename>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_restart.h b/include/commands/cmd_restart.h
deleted file mode 100644
index cd55ed15d..000000000
--- a/include/commands/cmd_restart.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_RESTART_H__
-#define __CMD_RESTART_H__
-
-// include the common header files
-
-#include <string>
-#include <deque>
-#include <vector>
-#include "users.h"
-#include "channels.h"
-
-/** Handle /RESTART. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandRestart : public Command
-{
- public:
- /** Constructor for restart.
- */
- CommandRestart (InspIRCd* Instance) : Command(Instance,NULL,"RESTART","o",1,false,0) { syntax = "<password>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_rules.h b/include/commands/cmd_rules.h
deleted file mode 100644
index f0d6a395f..000000000
--- a/include/commands/cmd_rules.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_RULES_H__
-#define __CMD_RULES_H__
-
-// include the common header files
-
-#include <string>
-#include <vector>
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-/** Handle /RULES. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandRules : public Command
-{
- public:
- /** Constructor for rules.
- */
- CommandRules (InspIRCd* Instance) : Command(Instance,NULL,"RULES",0,0) { syntax = "[<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_server.h b/include/commands/cmd_server.h
deleted file mode 100644
index f3469552d..000000000
--- a/include/commands/cmd_server.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_SERVER_H__
-#define __CMD_SERVER_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /SERVER. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandServer : public Command
-{
- public:
- /** Constructor for server.
- */
- CommandServer (InspIRCd* Instance) : Command(Instance,NULL,"SERVER",0,0,true) { }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_squit.h b/include/commands/cmd_squit.h
deleted file mode 100644
index 6090831be..000000000
--- a/include/commands/cmd_squit.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_SQUIT_H__
-#define __CMD_SQUIT_H__
-
-// include the common header files
-
-#include <string>
-#include <vector>
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-/** Handle /SQUIT. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandSquit : public Command
-{
- public:
- /** Constructor for squit.
- */
- CommandSquit (InspIRCd* Instance) : Command(Instance,NULL,"SQUIT","o",1) { syntax = "<servername> [<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_stats.h b/include/commands/cmd_stats.h
deleted file mode 100644
index 8df7def88..000000000
--- a/include/commands/cmd_stats.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_STATS_H__
-#define __CMD_STATS_H__
-
-// include the common header files
-
-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-
-DllExport void DoStats(InspIRCd* Instance, char statschar, User* user, string_list &results);
-
-/** Handle /STATS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandStats : public Command
-{
- public:
- /** Constructor for stats.
- */
- CommandStats (InspIRCd* Instance) : Command(Instance,NULL,"STATS",0,1) { syntax = "<stats-symbol> [<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_time.h b/include/commands/cmd_time.h
deleted file mode 100644
index 688618901..000000000
--- a/include/commands/cmd_time.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_TIME_H__
-#define __CMD_TIME_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /TIME. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandTime : public Command
-{
- public:
- /** Constructor for time.
- */
- CommandTime (InspIRCd* Instance) : Command(Instance,NULL,"TIME",0,0) { syntax = "[<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_topic.h b/include/commands/cmd_topic.h
deleted file mode 100644
index dc5ce1c77..000000000
--- a/include/commands/cmd_topic.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_TOPIC_H__
-#define __CMD_TOPIC_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /TOPIC. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandTopic : public Command
-{
- public:
- /** Constructor for topic.
- */
- CommandTopic (InspIRCd* Instance) : Command(Instance,NULL,"TOPIC",0,1,false,2) { syntax = "<channel> [<topic>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_trace.h b/include/commands/cmd_trace.h
deleted file mode 100644
index 871d150fd..000000000
--- a/include/commands/cmd_trace.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_TRACE_H__
-#define __CMD_TRACE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /TRACE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandTrace : public Command
-{
- public:
- /** Constructor for trace.
- */
- CommandTrace (InspIRCd* Instance) : Command(Instance,NULL,"TRACE","o",0) { syntax = "[<object>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_unloadmodule.h b/include/commands/cmd_unloadmodule.h
deleted file mode 100644
index dd60bfd79..000000000
--- a/include/commands/cmd_unloadmodule.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_UNLOADMODULE_H__
-#define __CMD_UNLOADMODULE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /UNLOADMODULE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandUnloadmodule : public Command
-{
- public:
- /** Constructor for unloadmodule.
- */
- CommandUnloadmodule (InspIRCd* Instance) : Command(Instance,NULL,"UNLOADMODULE","o",1) { syntax = "<modulename>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_user.h b/include/commands/cmd_user.h
deleted file mode 100644
index 9bc28b912..000000000
--- a/include/commands/cmd_user.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_USER_H__
-#define __CMD_USER_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /USER. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandUser : public Command
-{
- public:
- /** Constructor for user.
- */
- CommandUser (InspIRCd* Instance) : Command(Instance,NULL,"USER",0,4,true,0) { syntax = "<username> <localhost> <remotehost> <GECOS>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_userhost.h b/include/commands/cmd_userhost.h
deleted file mode 100644
index 1ba15f5a8..000000000
--- a/include/commands/cmd_userhost.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_USERHOST_H__
-#define __CMD_USERHOST_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /USERHOST. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandUserhost : public Command
-{
- public:
- /** Constructor for userhost.
- */
- CommandUserhost (InspIRCd* Instance) : Command(Instance,NULL,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_version.h b/include/commands/cmd_version.h
deleted file mode 100644
index f093591a4..000000000
--- a/include/commands/cmd_version.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_VERSION_H__
-#define __CMD_VERSION_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /VERSION. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandVersion : public Command
-{
- public:
- /** Constructor for version.
- */
- CommandVersion (InspIRCd* Instance) : Command(Instance,NULL,"VERSION",0,0) { syntax = "[<servername>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_wallops.h b/include/commands/cmd_wallops.h
deleted file mode 100644
index 34089cdae..000000000
--- a/include/commands/cmd_wallops.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_WALLOPS_H__
-#define __CMD_WALLOPS_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /WALLOPS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandWallops : public Command
-{
- public:
- /** Constructor for wallops.
- */
- CommandWallops (InspIRCd* Instance) : Command(Instance,NULL,"WALLOPS","o",1,1) { syntax = "<any-text>"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_who.h b/include/commands/cmd_who.h
deleted file mode 100644
index 65adc549c..000000000
--- a/include/commands/cmd_who.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_WHO_H__
-#define __CMD_WHO_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /WHO. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandWho : public Command
-{
- bool CanView(Channel* chan, User* user);
- bool opt_viewopersonly;
- bool opt_showrealhost;
- bool opt_unlimit;
- bool opt_realname;
- bool opt_mode;
- bool opt_ident;
- bool opt_metadata;
- bool opt_port;
- bool opt_away;
- bool opt_local;
- bool opt_far;
- bool opt_time;
-
- public:
- /** Constructor for who.
- */
- CommandWho (InspIRCd* Instance) : Command(Instance,NULL,"WHO", 0, 1, false, 2) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohurmMiaplf]"; }
- void SendWhoLine(User* user, const std::string &initial, Channel* ch, User* u, std::vector<std::string> &whoresults);
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
- bool whomatch(User* user, const char* matchtext);
-};
-
-#endif
diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h
deleted file mode 100644
index 494095e07..000000000
--- a/include/commands/cmd_whois.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_WHOIS_H__
-#define __CMD_WHOIS_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-const char* Spacify(char* n);
-DllExport void do_whois(InspIRCd* Instance, User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick);
-
-/** Handle /WHOIS. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandWhois : public Command
-{
- public:
- /** Constructor for whois.
- */
- CommandWhois (InspIRCd* Instance) : Command(Instance,NULL,"WHOIS",0,1,false,2) { syntax = "<nick>{,<nick>}"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h
index 9788b3d33..b28f44e17 100644
--- a/include/commands/cmd_whowas.h
+++ b/include/commands/cmd_whowas.h
@@ -72,7 +72,7 @@ class CommandWhowas : public Command
std::string stats;
public:
- CommandWhowas(InspIRCd* Instance);
+ CommandWhowas(InspIRCd* Instance, Module* parent);
/** Handle command.
* @param parameters The parameters to the comamnd
* @param pcnt The number of parameters passed to teh command
diff --git a/include/commands/cmd_zline.h b/include/commands/cmd_zline.h
deleted file mode 100644
index fa45ef154..000000000
--- a/include/commands/cmd_zline.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_ZLINE_H__
-#define __CMD_ZLINE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
-/** Handle /ZLINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
-class CommandZline : public Command
-{
- public:
- /** Constructor for zline.
- */
- CommandZline (InspIRCd* Instance) : Command(Instance,NULL,"ZLINE","o",1,3,false,0) { syntax = "<ipmask> [<duration> :<reason>]"; }
- /** Handle command.
- * @param parameters The parameters to the comamnd
- * @param pcnt The number of parameters passed to teh command
- * @param user The user issuing the command
- * @return A value from CmdResult to indicate command success or failure.
- */
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-};
-
-#endif
diff --git a/include/inspircd.h b/include/inspircd.h
index 92e446e03..ae46569a0 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -870,6 +870,14 @@ class CoreExport InspIRCd : public classbase
*/
void SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...) CUSTOM_PRINTF(5, 6);
+ /** Handle /STATS
+ */
+ void DoStats(char statschar, User* user, string_list &results);
+
+ /** Handle /WHOIS
+ */
+ void DoWhois(User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick);
+
/** Quit a user for excess flood, and if they are not
* fully registered yet, temporarily zline their IP.
* @param current user to quit
@@ -929,4 +937,20 @@ class CoreExport InspIRCd : public classbase
ENTRYPOINT;
+template<class Cmd>
+class CommandModule : public Module
+{
+ Cmd cmd;
+ public:
+ CommandModule(InspIRCd* me) : Module(me), cmd(me, this)
+ {
+ me->AddCommand(&cmd);
+ }
+
+ Version GetVersion()
+ {
+ return Version(cmd.command, VF_VENDOR);
+ }
+};
+
#endif
diff --git a/include/modules.h b/include/modules.h
index 86f77d218..fdc6e35b2 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1922,4 +1922,6 @@ class CoreExport ModuleManager : public classbase
}
#endif
+#define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)
+
#endif