summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command_parse.h14
-rw-r--r--include/commands/cmd_admin.h2
-rw-r--r--include/commands/cmd_away.h2
-rw-r--r--include/commands/cmd_clearcache.h2
-rw-r--r--include/commands/cmd_commands.h2
-rw-r--r--include/commands/cmd_connect.h2
-rw-r--r--include/commands/cmd_die.h2
-rw-r--r--include/commands/cmd_eline.h2
-rw-r--r--include/commands/cmd_gline.h2
-rw-r--r--include/commands/cmd_info.h2
-rw-r--r--include/commands/cmd_invite.h2
-rw-r--r--include/commands/cmd_ison.h2
-rw-r--r--include/commands/cmd_join.h2
-rw-r--r--include/commands/cmd_kick.h2
-rw-r--r--include/commands/cmd_kill.h2
-rw-r--r--include/commands/cmd_kline.h2
-rw-r--r--include/commands/cmd_links.h2
-rw-r--r--include/commands/cmd_list.h2
-rw-r--r--include/commands/cmd_loadmodule.h2
-rw-r--r--include/commands/cmd_lusers.h2
-rw-r--r--include/commands/cmd_map.h2
-rw-r--r--include/commands/cmd_mode.h2
-rw-r--r--include/commands/cmd_modules.h2
-rw-r--r--include/commands/cmd_motd.h2
-rw-r--r--include/commands/cmd_names.h2
-rw-r--r--include/commands/cmd_nick.h2
-rw-r--r--include/commands/cmd_notice.h2
-rw-r--r--include/commands/cmd_oper.h2
-rw-r--r--include/commands/cmd_part.h2
-rw-r--r--include/commands/cmd_pass.h2
-rw-r--r--include/commands/cmd_ping.h2
-rw-r--r--include/commands/cmd_pong.h2
-rw-r--r--include/commands/cmd_privmsg.h2
-rw-r--r--include/commands/cmd_qline.h2
-rw-r--r--include/commands/cmd_quit.h2
-rw-r--r--include/commands/cmd_rehash.h2
-rw-r--r--include/commands/cmd_reloadmodule.h2
-rw-r--r--include/commands/cmd_restart.h2
-rw-r--r--include/commands/cmd_rules.h2
-rw-r--r--include/commands/cmd_server.h2
-rw-r--r--include/commands/cmd_squit.h2
-rw-r--r--include/commands/cmd_stats.h2
-rw-r--r--include/commands/cmd_time.h2
-rw-r--r--include/commands/cmd_topic.h2
-rw-r--r--include/commands/cmd_trace.h2
-rw-r--r--include/commands/cmd_unloadmodule.h2
-rw-r--r--include/commands/cmd_user.h2
-rw-r--r--include/commands/cmd_userhost.h2
-rw-r--r--include/commands/cmd_version.h2
-rw-r--r--include/commands/cmd_wallops.h2
-rw-r--r--include/commands/cmd_who.h2
-rw-r--r--include/commands/cmd_whois.h2
-rw-r--r--include/commands/cmd_whowas.h2
-rw-r--r--include/commands/cmd_zline.h2
-rw-r--r--include/ctables.h4
-rw-r--r--include/inspircd.h4
-rw-r--r--include/mode.h2
-rw-r--r--include/modules.h4
58 files changed, 67 insertions, 67 deletions
diff --git a/include/command_parse.h b/include/command_parse.h
index 858c1c8e6..a8a14497e 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -39,7 +39,7 @@ class CoreExport CommandParser : public classbase
* @param parameters The input string
* @return The number of parameters parsed into command_p
*/
- int ProcessParameters(char **command_p,char *parameters);
+ int ProcessParameters(std::vector<std::string>& command_p, char* parameters);
/** Process a command from a user.
* @param user The user to parse the command for
@@ -84,7 +84,7 @@ class CoreExport CommandParser : public classbase
* @return True if the command was reloaded, false if it could not be found
* or another error occured
*/
- bool ReloadCommand(const char* cmd, User* user);
+ bool ReloadCommand(std::string cmd, User* user);
/** Default constructor.
* @param Instance The creator of this class
@@ -102,7 +102,7 @@ class CoreExport CommandParser : public classbase
* command simply did not exist at all or the wrong number of parameters were given, or the user
* was not privilaged enough to execute the command.
*/
- CmdResult CallHandler(const std::string &commandname,const char* const* parameters, int pcnt, User *user);
+ CmdResult CallHandler(const std::string &commandname, const std::vector<std::string>& parameters, User *user);
/** Get the handler function for a command.
* @param commandname The command required. Always use uppercase for this parameter.
@@ -118,7 +118,7 @@ class CoreExport CommandParser : public classbase
* equal to or greater than the minimum number of parameters to the given command, then this
* function will return true, otherwise it will return false.
*/
- bool IsValidCommand(const std::string &commandname, int pcnt, User * user);
+ bool IsValidCommand(const std::string &commandname, unsigned int pcnt, User * user);
/** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
* There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
@@ -141,7 +141,7 @@ class CoreExport CommandParser : public classbase
* @return This function will return 1 when there are no more parameters to process. When this occurs, its
* caller should return without doing anything, otherwise it should continue into its main section of code.
*/
- int LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere, unsigned int extra);
+ int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, unsigned int extra);
/** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
* There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
@@ -164,7 +164,7 @@ class CoreExport CommandParser : public classbase
* @return This function will return 1 when there are no more parameters to process. When this occurs, its
* caller should return without doing anything, otherwise it should continue into its main section of code.
*/
- int LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere);
+ int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere);
/** Take a raw input buffer from a recvq, and process it on behalf of a user.
* @param buffer The buffer line to process
@@ -219,7 +219,7 @@ class cmd_reload : public Command
cmd_reload (InspIRCd* Instance) : Command(Instance,"RELOAD","o",1) { syntax = "<core-command>"; }
/** Handle RELOAD
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user);
};
/** A lookup table of values for multiplier characters used by
diff --git a/include/commands/cmd_admin.h b/include/commands/cmd_admin.h
index f8181971b..a21a8b5dd 100644
--- a/include/commands/cmd_admin.h
+++ b/include/commands/cmd_admin.h
@@ -34,7 +34,7 @@ class CommandAdmin : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 48bc35f6f..a1405dc09 100644
--- a/include/commands/cmd_away.h
+++ b/include/commands/cmd_away.h
@@ -36,7 +36,7 @@ class CommandAway : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index c2edc4a08..248c2cdbe 100644
--- a/include/commands/cmd_clearcache.h
+++ b/include/commands/cmd_clearcache.h
@@ -35,7 +35,7 @@ class CommandClearcache : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index fbb0be259..a29f255cb 100644
--- a/include/commands/cmd_commands.h
+++ b/include/commands/cmd_commands.h
@@ -36,7 +36,7 @@ class CommandCommands : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 85a78adb7..7d869b8c6 100644
--- a/include/commands/cmd_connect.h
+++ b/include/commands/cmd_connect.h
@@ -36,7 +36,7 @@ class CommandConnect : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 7b805ee6e..eb726591a 100644
--- a/include/commands/cmd_die.h
+++ b/include/commands/cmd_die.h
@@ -36,7 +36,7 @@ class CommandDie : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 0849dcf82..2d5a2130c 100644
--- a/include/commands/cmd_eline.h
+++ b/include/commands/cmd_eline.h
@@ -36,7 +36,7 @@ class CommandEline : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 509f94de9..7db1f18a5 100644
--- a/include/commands/cmd_gline.h
+++ b/include/commands/cmd_gline.h
@@ -36,7 +36,7 @@ class CommandGline : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 692a1938e..28466862f 100644
--- a/include/commands/cmd_info.h
+++ b/include/commands/cmd_info.h
@@ -36,7 +36,7 @@ class CommandInfo : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 2df7a8a80..594cf2702 100644
--- a/include/commands/cmd_invite.h
+++ b/include/commands/cmd_invite.h
@@ -36,7 +36,7 @@ class CommandInvite : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 31bd9b659..8bfbd2bee 100644
--- a/include/commands/cmd_ison.h
+++ b/include/commands/cmd_ison.h
@@ -36,7 +36,7 @@ class CommandIson : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 9f095c73c..7b5fc76b9 100644
--- a/include/commands/cmd_join.h
+++ b/include/commands/cmd_join.h
@@ -36,7 +36,7 @@ class CommandJoin : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index b29afd899..35de5e52b 100644
--- a/include/commands/cmd_kick.h
+++ b/include/commands/cmd_kick.h
@@ -36,7 +36,7 @@ class CommandKick : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 7d5b24fb0..c9176a933 100644
--- a/include/commands/cmd_kill.h
+++ b/include/commands/cmd_kill.h
@@ -36,7 +36,7 @@ class CommandKill : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index c0601fe6f..98ac098de 100644
--- a/include/commands/cmd_kline.h
+++ b/include/commands/cmd_kline.h
@@ -36,7 +36,7 @@ class CommandKline : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 122de3782..3a4d284c9 100644
--- a/include/commands/cmd_links.h
+++ b/include/commands/cmd_links.h
@@ -36,7 +36,7 @@ class CommandLinks : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index a84a9c9c6..e3294349c 100644
--- a/include/commands/cmd_list.h
+++ b/include/commands/cmd_list.h
@@ -36,7 +36,7 @@ class CommandList : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 7255e3de7..3f1d23092 100644
--- a/include/commands/cmd_loadmodule.h
+++ b/include/commands/cmd_loadmodule.h
@@ -36,7 +36,7 @@ class CommandLoadmodule : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 9242d4e8b..4f473076e 100644
--- a/include/commands/cmd_lusers.h
+++ b/include/commands/cmd_lusers.h
@@ -36,7 +36,7 @@ class CommandLusers : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 77e77c901..979b8bcd6 100644
--- a/include/commands/cmd_map.h
+++ b/include/commands/cmd_map.h
@@ -36,7 +36,7 @@ class CommandMap : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index f573f7d1a..0025356fb 100644
--- a/include/commands/cmd_mode.h
+++ b/include/commands/cmd_mode.h
@@ -35,7 +35,7 @@ class CommandMode : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 11e9b106c..50428b73c 100644
--- a/include/commands/cmd_modules.h
+++ b/include/commands/cmd_modules.h
@@ -36,7 +36,7 @@ class CommandModules : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 42e334398..1aac64824 100644
--- a/include/commands/cmd_motd.h
+++ b/include/commands/cmd_motd.h
@@ -39,7 +39,7 @@ class CommandMotd : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 477f86afc..b9fd05ca6 100644
--- a/include/commands/cmd_names.h
+++ b/include/commands/cmd_names.h
@@ -36,7 +36,7 @@ class CommandNames : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 7cab63c09..18c65b587 100644
--- a/include/commands/cmd_nick.h
+++ b/include/commands/cmd_nick.h
@@ -37,7 +37,7 @@ class CommandNick : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user);
/** Handle internal command
* @param id Used to indicate if invalid nick changes are allowed.
diff --git a/include/commands/cmd_notice.h b/include/commands/cmd_notice.h
index e565bab0b..583edde51 100644
--- a/include/commands/cmd_notice.h
+++ b/include/commands/cmd_notice.h
@@ -36,7 +36,7 @@ class CommandNotice : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 80d7c8b37..3ec8cbca7 100644
--- a/include/commands/cmd_oper.h
+++ b/include/commands/cmd_oper.h
@@ -38,7 +38,7 @@ class CommandOper : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index cf6899163..82bd73621 100644
--- a/include/commands/cmd_part.h
+++ b/include/commands/cmd_part.h
@@ -36,7 +36,7 @@ class CommandPart : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 85279090c..aa0a35a4e 100644
--- a/include/commands/cmd_pass.h
+++ b/include/commands/cmd_pass.h
@@ -39,7 +39,7 @@ class CommandPass : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 6db0346b0..b7acb0213 100644
--- a/include/commands/cmd_ping.h
+++ b/include/commands/cmd_ping.h
@@ -36,7 +36,7 @@ class CommandPing : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 6b065fb21..2c96d5418 100644
--- a/include/commands/cmd_pong.h
+++ b/include/commands/cmd_pong.h
@@ -37,7 +37,7 @@ class CommandPong : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index eb8e43729..cb39ed99b 100644
--- a/include/commands/cmd_privmsg.h
+++ b/include/commands/cmd_privmsg.h
@@ -36,7 +36,7 @@ class CommandPrivmsg : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index b6e58a4a8..de70bb78b 100644
--- a/include/commands/cmd_qline.h
+++ b/include/commands/cmd_qline.h
@@ -36,7 +36,7 @@ class CommandQline : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index b6ea0e9b0..b26cfa9a7 100644
--- a/include/commands/cmd_quit.h
+++ b/include/commands/cmd_quit.h
@@ -36,7 +36,7 @@ class CommandQuit : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 92282fe8a..23dec0462 100644
--- a/include/commands/cmd_rehash.h
+++ b/include/commands/cmd_rehash.h
@@ -36,7 +36,7 @@ class CommandRehash : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 16976351e..df221952e 100644
--- a/include/commands/cmd_reloadmodule.h
+++ b/include/commands/cmd_reloadmodule.h
@@ -36,7 +36,7 @@ class CommandReloadmodule : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 5c3c5d733..6ad33655a 100644
--- a/include/commands/cmd_restart.h
+++ b/include/commands/cmd_restart.h
@@ -39,7 +39,7 @@ class CommandRestart : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 369c39800..c47a7839c 100644
--- a/include/commands/cmd_rules.h
+++ b/include/commands/cmd_rules.h
@@ -39,7 +39,7 @@ class CommandRules : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 6853de674..9de4b8381 100644
--- a/include/commands/cmd_server.h
+++ b/include/commands/cmd_server.h
@@ -36,7 +36,7 @@ class CommandServer : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 0201ab59c..3d950c5f5 100644
--- a/include/commands/cmd_squit.h
+++ b/include/commands/cmd_squit.h
@@ -39,7 +39,7 @@ class CommandSquit : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index b7d02f3a3..25037b6b0 100644
--- a/include/commands/cmd_stats.h
+++ b/include/commands/cmd_stats.h
@@ -39,7 +39,7 @@ class CommandStats : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index dd86e7890..d45c23ba3 100644
--- a/include/commands/cmd_time.h
+++ b/include/commands/cmd_time.h
@@ -36,7 +36,7 @@ class CommandTime : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 444e61cfc..27cc2073d 100644
--- a/include/commands/cmd_topic.h
+++ b/include/commands/cmd_topic.h
@@ -36,7 +36,7 @@ class CommandTopic : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index ad91f7a37..29e2af769 100644
--- a/include/commands/cmd_trace.h
+++ b/include/commands/cmd_trace.h
@@ -36,7 +36,7 @@ class CommandTrace : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 3fdc70bfd..63b11f95d 100644
--- a/include/commands/cmd_unloadmodule.h
+++ b/include/commands/cmd_unloadmodule.h
@@ -36,7 +36,7 @@ class CommandUnloadmodule : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index f0eec34cb..55a5ba115 100644
--- a/include/commands/cmd_user.h
+++ b/include/commands/cmd_user.h
@@ -36,7 +36,7 @@ class CommandUser : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index fa26ae1ed..b72315448 100644
--- a/include/commands/cmd_userhost.h
+++ b/include/commands/cmd_userhost.h
@@ -36,7 +36,7 @@ class CommandUserhost : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 01e475dfc..3b85fb408 100644
--- a/include/commands/cmd_version.h
+++ b/include/commands/cmd_version.h
@@ -36,7 +36,7 @@ class CommandVersion : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 3a87ce608..fdc522fc6 100644
--- a/include/commands/cmd_wallops.h
+++ b/include/commands/cmd_wallops.h
@@ -36,7 +36,7 @@ class CommandWallops : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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
index 87ea44449..bdcf00c0b 100644
--- a/include/commands/cmd_who.h
+++ b/include/commands/cmd_who.h
@@ -49,7 +49,7 @@ class CommandWho : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user);
bool whomatch(User* user, const char* matchtext);
};
diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h
index bee2f760f..64e2a94cf 100644
--- a/include/commands/cmd_whois.h
+++ b/include/commands/cmd_whois.h
@@ -39,7 +39,7 @@ class CommandWhois : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ 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 1b75987df..7ebdef9a0 100644
--- a/include/commands/cmd_whowas.h
+++ b/include/commands/cmd_whowas.h
@@ -79,7 +79,7 @@ class CommandWhowas : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user);
/** Handle an internal request from another command, the core, or a module
* @param Command ID
* @param Zero or more parameters, whos form is specified by the command ID.
diff --git a/include/commands/cmd_zline.h b/include/commands/cmd_zline.h
index 6b1ca9e0a..ddf4b956e 100644
--- a/include/commands/cmd_zline.h
+++ b/include/commands/cmd_zline.h
@@ -36,7 +36,7 @@ class CommandZline : public Command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const char* const* parameters, int pcnt, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user);
};
#endif
diff --git a/include/ctables.h b/include/ctables.h
index ba6773a4c..8ca08d9e4 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -59,7 +59,7 @@ class CoreExport Command : public Extensible
char flags_needed;
/** Minimum number of parameters command takes
*/
- int min_params;
+ unsigned int min_params;
/** used by /stats m
*/
long double use_count;
@@ -113,7 +113,7 @@ class CoreExport Command : public Extensible
* If the command succeeds but should remain local to this server,
* return CMD_LOCALONLY.
*/
- virtual CmdResult Handle(const char* const* parameters, int pcnt, User* user) = 0;
+ virtual CmdResult Handle(const std::vector<std::string>& parameters, User* user) = 0;
/** Handle an internal request from another command, the core, or a module
* @param Command ID
diff --git a/include/inspircd.h b/include/inspircd.h
index 1b88ca0b7..dba38d272 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -679,7 +679,7 @@ class CoreExport InspIRCd : public classbase
* @param pcnt The number of items you have given in the first parameter
* @param user The user to send error messages to
*/
- void SendMode(const char* const* parameters, int pcnt, User *user);
+ void SendMode(const std::vector<std::string>& parameters, User *user);
/** Match two strings using pattern matching.
* This operates identically to the global function match(),
@@ -697,7 +697,7 @@ class CoreExport InspIRCd : public classbase
* @param user The user to execute the command as
* @return True if the command handler was called successfully
*/
- CmdResult CallCommandHandler(const std::string &commandname, const char* const* parameters, int pcnt, User* user);
+ CmdResult CallCommandHandler(const std::string &commandname, const std::vector<std::string>& parameters, User* user);
/** Return true if the command is a module-implemented command and the given parameters are valid for it
* @param parameters The mode parameters
diff --git a/include/mode.h b/include/mode.h
index 5d4ce0c8c..ac0c3135a 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -502,7 +502,7 @@ class CoreExport ModeParser : public classbase
* and *user->server == NULL.
* @param servermode True if a server is setting the mode.
*/
- void Process(const char* const* parameters, int pcnt, User *user, bool servermode);
+ void Process(const std::vector<std::string>& parameters, User *user, bool servermode);
/** Find the mode handler for a given mode and type.
* @param modeletter mode letter to search for
diff --git a/include/modules.h b/include/modules.h
index ef2e4b0e4..722bf4e3c 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1037,7 +1037,7 @@ class CoreExport Module : public Extensible
* @param original_line The entire original line as passed to the parser from the user
* @return 1 to block the command, 0 to allow
*/
- virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line);
+ virtual int OnPreCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
/** Called after any command has been executed.
* This event occurs for all registered commands, wether they are registered in the core,
@@ -1051,7 +1051,7 @@ class CoreExport Module : public Extensible
* @param result The return code given by the command handler, one of CMD_SUCCESS or CMD_FAILURE
* @param original_line The entire original line as passed to the parser from the user
*/
- virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line);
+ virtual void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line);
/** Called to check if a user who is connecting can now be allowed to register
* If any modules return false for this function, the user is held in the waiting