From dd36852a52e8541306b76c5b88bce8ab9b36654c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 20 Feb 2008 19:07:07 +0000 Subject: Wheee, mass commit! this adds const stafety, throwing a compile error if anyone does: "parameters[n] = blahvar;" in a command handler etc. where they REALLY SHOULD NOT fuck with the value and should copy the pointer. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8971 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/command_parse.h | 8 ++--- include/commands/cmd_admin.h | 2 +- include/commands/cmd_away.h | 2 +- include/commands/cmd_clearcache.h | 2 +- include/commands/cmd_commands.h | 2 +- include/commands/cmd_connect.h | 2 +- include/commands/cmd_die.h | 2 +- include/commands/cmd_eline.h | 2 +- include/commands/cmd_gline.h | 2 +- include/commands/cmd_info.h | 2 +- include/commands/cmd_invite.h | 2 +- include/commands/cmd_ison.h | 2 +- include/commands/cmd_join.h | 2 +- include/commands/cmd_kick.h | 2 +- include/commands/cmd_kill.h | 2 +- include/commands/cmd_kline.h | 2 +- include/commands/cmd_links.h | 2 +- include/commands/cmd_list.h | 2 +- include/commands/cmd_loadmodule.h | 2 +- include/commands/cmd_lusers.h | 2 +- include/commands/cmd_map.h | 2 +- include/commands/cmd_mode.h | 2 +- include/commands/cmd_modules.h | 2 +- include/commands/cmd_motd.h | 2 +- include/commands/cmd_names.h | 2 +- include/commands/cmd_nick.h | 2 +- include/commands/cmd_notice.h | 2 +- include/commands/cmd_oper.h | 2 +- include/commands/cmd_part.h | 2 +- include/commands/cmd_pass.h | 2 +- include/commands/cmd_ping.h | 2 +- include/commands/cmd_pong.h | 2 +- include/commands/cmd_privmsg.h | 2 +- include/commands/cmd_qline.h | 2 +- include/commands/cmd_quit.h | 2 +- include/commands/cmd_rehash.h | 2 +- include/commands/cmd_reloadmodule.h | 2 +- include/commands/cmd_restart.h | 2 +- include/commands/cmd_rules.h | 2 +- include/commands/cmd_server.h | 2 +- include/commands/cmd_squit.h | 2 +- include/commands/cmd_stats.h | 2 +- include/commands/cmd_time.h | 2 +- include/commands/cmd_topic.h | 2 +- include/commands/cmd_trace.h | 2 +- include/commands/cmd_unloadmodule.h | 2 +- include/commands/cmd_user.h | 2 +- include/commands/cmd_userhost.h | 2 +- include/commands/cmd_version.h | 2 +- include/commands/cmd_wallops.h | 2 +- include/commands/cmd_who.h | 2 +- include/commands/cmd_whois.h | 2 +- include/commands/cmd_whowas.h | 2 +- include/commands/cmd_zline.h | 2 +- include/ctables.h | 4 +-- include/hashcomp.h | 4 +-- include/inspircd.h | 4 +-- include/mode.h | 2 +- include/modules.h | 4 +-- src/command_parse.cpp | 8 ++--- src/commands/cmd_admin.cpp | 2 +- src/commands/cmd_away.cpp | 2 +- src/commands/cmd_clearcache.cpp | 2 +- src/commands/cmd_commands.cpp | 2 +- src/commands/cmd_connect.cpp | 2 +- src/commands/cmd_die.cpp | 2 +- src/commands/cmd_eline.cpp | 2 +- src/commands/cmd_gline.cpp | 2 +- src/commands/cmd_info.cpp | 2 +- src/commands/cmd_invite.cpp | 2 +- src/commands/cmd_ison.cpp | 2 +- src/commands/cmd_join.cpp | 2 +- src/commands/cmd_kick.cpp | 2 +- src/commands/cmd_kill.cpp | 2 +- src/commands/cmd_kline.cpp | 2 +- src/commands/cmd_links.cpp | 2 +- src/commands/cmd_list.cpp | 2 +- src/commands/cmd_loadmodule.cpp | 2 +- src/commands/cmd_lusers.cpp | 2 +- src/commands/cmd_map.cpp | 2 +- src/commands/cmd_mode.cpp | 2 +- src/commands/cmd_modules.cpp | 2 +- src/commands/cmd_motd.cpp | 2 +- src/commands/cmd_names.cpp | 2 +- src/commands/cmd_nick.cpp | 2 +- src/commands/cmd_notice.cpp | 45 +++++++++++++------------ src/commands/cmd_oper.cpp | 2 +- src/commands/cmd_part.cpp | 2 +- src/commands/cmd_pass.cpp | 2 +- src/commands/cmd_ping.cpp | 2 +- src/commands/cmd_pong.cpp | 2 +- src/commands/cmd_privmsg.cpp | 44 ++++++++++++------------ src/commands/cmd_qline.cpp | 2 +- src/commands/cmd_quit.cpp | 2 +- src/commands/cmd_rehash.cpp | 2 +- src/commands/cmd_reloadmodule.cpp | 2 +- src/commands/cmd_restart.cpp | 2 +- src/commands/cmd_rules.cpp | 2 +- src/commands/cmd_server.cpp | 2 +- src/commands/cmd_squit.cpp | 2 +- src/commands/cmd_stats.cpp | 2 +- src/commands/cmd_time.cpp | 2 +- src/commands/cmd_topic.cpp | 2 +- src/commands/cmd_trace.cpp | 2 +- src/commands/cmd_unloadmodule.cpp | 2 +- src/commands/cmd_user.cpp | 2 +- src/commands/cmd_userhost.cpp | 2 +- src/commands/cmd_version.cpp | 2 +- src/commands/cmd_wallops.cpp | 2 +- src/commands/cmd_who.cpp | 2 +- src/commands/cmd_whois.cpp | 2 +- src/commands/cmd_whowas.cpp | 2 +- src/commands/cmd_zline.cpp | 2 +- src/hashcomp.cpp | 2 +- src/mode.cpp | 2 +- src/modules.cpp | 8 ++--- src/modules/extra/m_rline.cpp | 2 +- src/modules/extra/m_sqllog.cpp | 2 +- src/modules/extra/m_sqloper.cpp | 2 +- src/modules/extra/m_ssl_oper_cert.cpp | 4 +-- src/modules/extra/m_sslinfo.cpp | 2 +- src/modules/m_alias.cpp | 2 +- src/modules/m_alltime.cpp | 2 +- src/modules/m_antibear.cpp | 2 +- src/modules/m_antibottler.cpp | 2 +- src/modules/m_blockamsg.cpp | 2 +- src/modules/m_callerid.cpp | 2 +- src/modules/m_cban.cpp | 2 +- src/modules/m_cgiirc.cpp | 2 +- src/modules/m_check.cpp | 2 +- src/modules/m_chghost.cpp | 2 +- src/modules/m_chgident.cpp | 2 +- src/modules/m_chgname.cpp | 2 +- src/modules/m_clones.cpp | 2 +- src/modules/m_close.cpp | 2 +- src/modules/m_conn_waitpong.cpp | 2 +- src/modules/m_customtitle.cpp | 2 +- src/modules/m_cycle.cpp | 2 +- src/modules/m_dccallow.cpp | 2 +- src/modules/m_devoice.cpp | 2 +- src/modules/m_filter.h | 6 ++-- src/modules/m_globalload.cpp | 6 ++-- src/modules/m_globops.cpp | 2 +- src/modules/m_helpop.cpp | 2 +- src/modules/m_jumpserver.cpp | 2 +- src/modules/m_knock.cpp | 2 +- src/modules/m_lockserv.cpp | 4 +-- src/modules/m_namesx.cpp | 2 +- src/modules/m_nicklock.cpp | 4 +-- src/modules/m_operlog.cpp | 2 +- src/modules/m_opermotd.cpp | 2 +- src/modules/m_override.cpp | 2 +- src/modules/m_password_hash.cpp | 2 +- src/modules/m_randquote.cpp | 2 +- src/modules/m_remove.cpp | 6 ++-- src/modules/m_safelist.cpp | 4 +-- src/modules/m_sajoin.cpp | 2 +- src/modules/m_samode.cpp | 2 +- src/modules/m_sanick.cpp | 2 +- src/modules/m_sapart.cpp | 2 +- src/modules/m_saquit.cpp | 2 +- src/modules/m_securelist.cpp | 2 +- src/modules/m_sethost.cpp | 2 +- src/modules/m_setident.cpp | 2 +- src/modules/m_setidle.cpp | 2 +- src/modules/m_setname.cpp | 2 +- src/modules/m_silence.cpp | 2 +- src/modules/m_silence_ext.cpp | 2 +- src/modules/m_spanningtree/main.cpp | 8 ++--- src/modules/m_spanningtree/main.h | 28 +++++++-------- src/modules/m_spanningtree/override_admin.cpp | 2 +- src/modules/m_spanningtree/override_map.cpp | 2 +- src/modules/m_spanningtree/override_modules.cpp | 2 +- src/modules/m_spanningtree/override_motd.cpp | 2 +- src/modules/m_spanningtree/override_squit.cpp | 2 +- src/modules/m_spanningtree/override_stats.cpp | 2 +- src/modules/m_spanningtree/override_time.cpp | 2 +- src/modules/m_spanningtree/override_whois.cpp | 2 +- src/modules/m_spanningtree/postcommand.cpp | 2 +- src/modules/m_spanningtree/precommand.cpp | 2 +- src/modules/m_spanningtree/rconnect.cpp | 2 +- src/modules/m_spanningtree/rconnect.h | 2 +- src/modules/m_spanningtree/rsquit.cpp | 2 +- src/modules/m_spanningtree/rsquit.h | 2 +- src/modules/m_svshold.cpp | 2 +- src/modules/m_swhois.cpp | 4 +-- src/modules/m_taxonomy.cpp | 2 +- src/modules/m_testcommand.cpp | 2 +- src/modules/m_timedbans.cpp | 2 +- src/modules/m_tline.cpp | 2 +- src/modules/m_uhnames.cpp | 2 +- src/modules/m_uninvite.cpp | 2 +- src/modules/m_userip.cpp | 2 +- src/modules/m_vhost.cpp | 2 +- src/modules/m_watch.cpp | 4 +-- 195 files changed, 279 insertions(+), 278 deletions(-) diff --git a/include/command_parse.h b/include/command_parse.h index 25d334dbf..fea8bd869 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -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** parameters, int pcnt, User *user); + CmdResult CallHandler(const std::string &commandname,const char* const* parameters, int pcnt, User *user); /** Get the handler function for a command. * @param commandname The command required. Always use uppercase for this parameter. @@ -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** parameters, int pcnt, unsigned int splithere, unsigned int extra); + int LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, 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** parameters, int pcnt, unsigned int splithere); + int LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, 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 @@ -220,7 +220,7 @@ class cmd_reload : public Command cmd_reload (InspIRCd* Instance) : Command(Instance,"RELOAD","o",1) { syntax = ""; } /** Handle RELOAD */ - CmdResult Handle(const char** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, 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 cbec10e57..f8181971b 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_away.h b/include/commands/cmd_away.h index ac932ec1c..48bc35f6f 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_clearcache.h b/include/commands/cmd_clearcache.h index d3435391a..c2edc4a08 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_commands.h b/include/commands/cmd_commands.h index 801c49be7..fbb0be259 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_connect.h b/include/commands/cmd_connect.h index 907108a13..85a78adb7 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_die.h b/include/commands/cmd_die.h index 903fa8a25..7b805ee6e 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_eline.h b/include/commands/cmd_eline.h index 0bcfbfc96..0849dcf82 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_gline.h b/include/commands/cmd_gline.h index 11e67448a..509f94de9 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_info.h b/include/commands/cmd_info.h index c21e35a7f..692a1938e 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_invite.h b/include/commands/cmd_invite.h index 8d50adb4c..2df7a8a80 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_ison.h b/include/commands/cmd_ison.h index 146cd4216..31bd9b659 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_join.h b/include/commands/cmd_join.h index 9e5a5a918..9f095c73c 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_kick.h b/include/commands/cmd_kick.h index 35ec1434d..b29afd899 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_kill.h b/include/commands/cmd_kill.h index 16d80bb5e..7d5b24fb0 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_kline.h b/include/commands/cmd_kline.h index fda1f39f4..c0601fe6f 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_links.h b/include/commands/cmd_links.h index 8f1f957d5..122de3782 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_list.h b/include/commands/cmd_list.h index 4e0e03314..a84a9c9c6 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_loadmodule.h b/include/commands/cmd_loadmodule.h index 14b843449..7255e3de7 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_lusers.h b/include/commands/cmd_lusers.h index 70e1d885f..9242d4e8b 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_map.h b/include/commands/cmd_map.h index 85e24b542..77e77c901 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_mode.h b/include/commands/cmd_mode.h index 32d3528e3..f573f7d1a 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_modules.h b/include/commands/cmd_modules.h index a18d1dffc..11e9b106c 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_motd.h b/include/commands/cmd_motd.h index fb6a8da5a..42e334398 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_names.h b/include/commands/cmd_names.h index 5c81d4796..477f86afc 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_nick.h b/include/commands/cmd_nick.h index 70e074251..7cab63c09 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, 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 59d3b0260..e565bab0b 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_oper.h b/include/commands/cmd_oper.h index 5a48f3d8f..80d7c8b37 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_part.h b/include/commands/cmd_part.h index 330cc0405..cf6899163 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_pass.h b/include/commands/cmd_pass.h index b156a9528..85279090c 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_ping.h b/include/commands/cmd_ping.h index f1dc42fc2..6db0346b0 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_pong.h b/include/commands/cmd_pong.h index b96f12dcb..6b065fb21 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_privmsg.h b/include/commands/cmd_privmsg.h index 8559fd93f..eb8e43729 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_qline.h b/include/commands/cmd_qline.h index d3c0ae85e..b6e58a4a8 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_quit.h b/include/commands/cmd_quit.h index 113cabe61..b6ea0e9b0 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_rehash.h b/include/commands/cmd_rehash.h index 3d538ea32..92282fe8a 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_reloadmodule.h b/include/commands/cmd_reloadmodule.h index f35caf0f2..16976351e 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_restart.h b/include/commands/cmd_restart.h index ddb14cbbc..5c3c5d733 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_rules.h b/include/commands/cmd_rules.h index 950cb5623..369c39800 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_server.h b/include/commands/cmd_server.h index 4ee7e307d..6853de674 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_squit.h b/include/commands/cmd_squit.h index 9b1a19bf2..0201ab59c 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_stats.h b/include/commands/cmd_stats.h index 522e74cee..b7d02f3a3 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_time.h b/include/commands/cmd_time.h index 81016078e..dd86e7890 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_topic.h b/include/commands/cmd_topic.h index 66540af89..444e61cfc 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_trace.h b/include/commands/cmd_trace.h index 3c476d1a7..ad91f7a37 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_unloadmodule.h b/include/commands/cmd_unloadmodule.h index bffbe3f24..3fdc70bfd 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_user.h b/include/commands/cmd_user.h index fff67ac82..f0eec34cb 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_userhost.h b/include/commands/cmd_userhost.h index dd3afc37c..fa26ae1ed 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_version.h b/include/commands/cmd_version.h index 0fc95dd06..01e475dfc 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_wallops.h b/include/commands/cmd_wallops.h index 84e8234c5..3a87ce608 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_who.h b/include/commands/cmd_who.h index 78a994eec..87ea44449 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); bool whomatch(User* user, const char* matchtext); }; diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h index 316a7695c..bee2f760f 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index 51ec38b17..1b75987df 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, 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 b6a3a037a..6b1ca9e0a 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** parameters, int pcnt, User *user); + CmdResult Handle(const char* const* parameters, int pcnt, User *user); }; #endif diff --git a/include/ctables.h b/include/ctables.h index 513342af2..fa0d42d74 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -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** parameters, int pcnt, User* user) = 0; + virtual CmdResult Handle(const char* const* parameters, int pcnt, User* user) = 0; /** Handle an internal request from another command, the core, or a module * @param Command ID @@ -136,7 +136,7 @@ class CoreExport Command : public Extensible * If the command succeeds but should remain local to this server, * return CMD_LOCALONLY. */ - virtual CmdResult HandleServer(const char** /* parameters */, int /* pcnt */, const std::string& /* servername */) + virtual CmdResult HandleServer(const char* const* /* parameters */, int /* pcnt */, const std::string& /* servername */) { return CMD_INVALID; } diff --git a/include/hashcomp.h b/include/hashcomp.h index eafc74abf..ed285c783 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -129,7 +129,7 @@ namespace irc /** irc::stringjoiner joins string lists into a string, using * the given seperator string. * This class can join a vector of std::string, a deque of - * std::string, or a const char** array, using overloaded + * std::string, or a const char* const* array, using overloaded * constructors. */ class CoreExport stringjoiner @@ -159,7 +159,7 @@ namespace irc * @param begin The starting element in the sequence to be joined * @param end The ending element in the sequence to be joined */ - stringjoiner(const std::string &seperator, const char** sequence, int begin, int end); + stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end); /** Get the joined sequence * @return A reference to the joined string diff --git a/include/inspircd.h b/include/inspircd.h index 5fd641c6b..ec7fbd63a 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -656,7 +656,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 **parameters, int pcnt, User *user); + void SendMode(const char* const* parameters, int pcnt, User *user); /** Match two strings using pattern matching. * This operates identically to the global function match(), @@ -674,7 +674,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** parameters, int pcnt, User* user); + CmdResult CallCommandHandler(const std::string &commandname, const char* const* parameters, int pcnt, 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 8669f50e5..ca610e46a 100644 --- a/include/mode.h +++ b/include/mode.h @@ -467,7 +467,7 @@ class CoreExport ModeParser : public classbase * and *user->server == NULL. * @param servermode True if a server is setting the mode. */ - void Process(const char** parameters, int pcnt, User *user, bool servermode); + void Process(const char* const* parameters, int pcnt, 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 14a0186cb..f19df390c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1044,7 +1044,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** parameters, int pcnt, User *user, bool validated, const std::string &original_line); + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, 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, @@ -1058,7 +1058,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** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line); + virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, 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 diff --git a/src/command_parse.cpp b/src/command_parse.cpp index a4e1e00d5..57a86b0cd 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -48,7 +48,7 @@ int InspIRCd::PassCompare(Extensible* ex, const char* data,const char* input, co * The second version is much simpler and just has the one stream to read, and is used in NAMES, WHOIS, PRIVMSG etc. * Both will only parse until they reach ServerInstance->Config->MaxTargets number of targets, to stop abuse via spam. */ -int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra) +int CommandParser::LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere, unsigned int extra) { /* First check if we have more than one item in the list, if we don't we return zero here and the handler * which called us just carries on as it was. @@ -97,7 +97,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parame return 1; } -int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere) +int CommandParser::LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere) { /* First check if we have more than one item in the list, if we don't we return zero here and the handler * which called us just carries on as it was. @@ -178,7 +178,7 @@ Command* CommandParser::GetHandler(const std::string &commandname) // calls a handler function for a command -CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, User *user) +CmdResult CommandParser::CallHandler(const std::string &commandname,const char* const* parameters, int pcnt, User *user) { Commandable::iterator n = cmdlist.find(commandname); @@ -498,7 +498,7 @@ bool CommandParser::ReloadCommand(const char* cmd, User* user) return false; } -CmdResult cmd_reload::Handle(const char** parameters, int /* pcnt */, User *user) +CmdResult cmd_reload::Handle(const char* const* parameters, int /* pcnt */, User *user) { user->WriteServ("NOTICE %s :*** Reloading command '%s'",user->nick, parameters[0]); if (ServerInstance->Parser->ReloadCommand(parameters[0], user)) diff --git a/src/commands/cmd_admin.cpp b/src/commands/cmd_admin.cpp index 9957c97d2..8f5dfd3f8 100644 --- a/src/commands/cmd_admin.cpp +++ b/src/commands/cmd_admin.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /ADMIN */ -CmdResult CommandAdmin::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandAdmin::Handle (const char* const* parameters, int pcnt, User *user) { user->WriteServ("256 %s :Administrative info for %s",user->nick,ServerInstance->Config->ServerName); if (*ServerInstance->Config->AdminName) diff --git a/src/commands/cmd_away.cpp b/src/commands/cmd_away.cpp index dd708edfc..ffddbba44 100644 --- a/src/commands/cmd_away.cpp +++ b/src/commands/cmd_away.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /AWAY */ -CmdResult CommandAway::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandAway::Handle (const char* const* parameters, int pcnt, User *user) { if ((pcnt) && (*parameters[0])) { diff --git a/src/commands/cmd_clearcache.cpp b/src/commands/cmd_clearcache.cpp index 250e4b825..c7354df07 100644 --- a/src/commands/cmd_clearcache.cpp +++ b/src/commands/cmd_clearcache.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /CLEARCACHE */ -CmdResult CommandClearcache::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandClearcache::Handle (const char* const* parameters, int pcnt, User *user) { int n = ServerInstance->Res->ClearCache(); user->WriteServ("NOTICE %s :*** Cleared DNS cache of %d items.", user->nick, n); diff --git a/src/commands/cmd_commands.cpp b/src/commands/cmd_commands.cpp index 7fe1a9ffa..e559a9e2f 100644 --- a/src/commands/cmd_commands.cpp +++ b/src/commands/cmd_commands.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandCommands(Instance); } -CmdResult CommandCommands::Handle (const char**, int, User *user) +CmdResult CommandCommands::Handle (const char* const*, int, User *user) { for (Commandable::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++) { diff --git a/src/commands/cmd_connect.cpp b/src/commands/cmd_connect.cpp index 7eb909c10..04aada207 100644 --- a/src/commands/cmd_connect.cpp +++ b/src/commands/cmd_connect.cpp @@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /CONNECT */ -CmdResult CommandConnect::Handle (const char**, int, User *user) +CmdResult CommandConnect::Handle (const char* const*, int, User *user) { user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick); return CMD_SUCCESS; diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp index 0afb6f248..960cefe63 100644 --- a/src/commands/cmd_die.cpp +++ b/src/commands/cmd_die.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /DIE */ -CmdResult CommandDie::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandDie::Handle (const char* const* parameters, int pcnt, User *user) { if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0], ServerInstance->Config->powerhash)) { diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp index 5893fd9b7..fa9ddd708 100644 --- a/src/commands/cmd_eline.cpp +++ b/src/commands/cmd_eline.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /ELINE */ -CmdResult CommandEline::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandEline::Handle (const char* const* parameters, int pcnt, User *user) { std::string target = parameters[0]; diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp index 0061bfe00..a6bec9c0e 100644 --- a/src/commands/cmd_gline.cpp +++ b/src/commands/cmd_gline.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /GLINE */ -CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandGline::Handle (const char* const* parameters, int pcnt, User *user) { std::string target = parameters[0]; diff --git a/src/commands/cmd_info.cpp b/src/commands/cmd_info.cpp index 65a9713f7..64d438b83 100644 --- a/src/commands/cmd_info.cpp +++ b/src/commands/cmd_info.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /INFO */ -CmdResult CommandInfo::Handle (const char**, int, User *user) +CmdResult CommandInfo::Handle (const char* const*, int, User *user) { user->WriteServ( "371 %s : -/\\- \2InspIRCd\2 -\\/-", user->nick); user->WriteServ( "371 %s : November 2002 - Present", user->nick); diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index 42905d9bf..49296ca42 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /INVITE */ -CmdResult CommandInvite::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandInvite::Handle (const char* const* parameters, int pcnt, User *user) { int MOD_RESULT = 0; diff --git a/src/commands/cmd_ison.cpp b/src/commands/cmd_ison.cpp index b0e77129e..ba119e251 100644 --- a/src/commands/cmd_ison.cpp +++ b/src/commands/cmd_ison.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /ISON */ -CmdResult CommandIson::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandIson::Handle (const char* const* parameters, int pcnt, User *user) { std::map ison_already; User *u; diff --git a/src/commands/cmd_join.cpp b/src/commands/cmd_join.cpp index 1c640b326..513901e47 100644 --- a/src/commands/cmd_join.cpp +++ b/src/commands/cmd_join.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /JOIN */ -CmdResult CommandJoin::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandJoin::Handle (const char* const* parameters, int pcnt, User *user) { if (pcnt > 1) { diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp index 0a6e34cb2..329a37bcf 100644 --- a/src/commands/cmd_kick.cpp +++ b/src/commands/cmd_kick.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /KICK */ -CmdResult CommandKick::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandKick::Handle (const char* const* parameters, int pcnt, User *user) { char reason[MAXKICK]; Channel* c = ServerInstance->FindChan(parameters[0]); diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp index 6a1e64d7f..c92b8a6b0 100644 --- a/src/commands/cmd_kill.cpp +++ b/src/commands/cmd_kill.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /KILL */ -CmdResult CommandKill::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandKill::Handle (const char* const* parameters, int pcnt, User *user) { /* Allow comma seperated lists of users for /KILL (thanks w00t) */ if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0)) diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp index d96873dc1..b4464a6d3 100644 --- a/src/commands/cmd_kline.cpp +++ b/src/commands/cmd_kline.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /KLINE */ -CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandKline::Handle (const char* const* parameters, int pcnt, User *user) { std::string target = parameters[0]; diff --git a/src/commands/cmd_links.cpp b/src/commands/cmd_links.cpp index 663e40881..973e5f0a6 100644 --- a/src/commands/cmd_links.cpp +++ b/src/commands/cmd_links.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /LINKS */ -CmdResult CommandLinks::Handle (const char**, int, User *user) +CmdResult CommandLinks::Handle (const char* const*, int, User *user) { user->WriteServ("364 %s %s %s :0 %s",user->nick,ServerInstance->Config->ServerName,ServerInstance->Config->ServerName,ServerInstance->Config->ServerDesc); user->WriteServ("365 %s * :End of /LINKS list.",user->nick); diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp index 970e26117..2ead367a4 100644 --- a/src/commands/cmd_list.cpp +++ b/src/commands/cmd_list.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandList(Instance); } -CmdResult CommandList::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandList::Handle (const char* const* parameters, int pcnt, User *user) { int minusers = 0, maxusers = 0; diff --git a/src/commands/cmd_loadmodule.cpp b/src/commands/cmd_loadmodule.cpp index 15678e5fc..043bae14e 100644 --- a/src/commands/cmd_loadmodule.cpp +++ b/src/commands/cmd_loadmodule.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /LOADMODULE */ -CmdResult CommandLoadmodule::Handle (const char** parameters, int, User *user) +CmdResult CommandLoadmodule::Handle (const char* const* parameters, int, User *user) { if (ServerInstance->Modules->Load(parameters[0])) { diff --git a/src/commands/cmd_lusers.cpp b/src/commands/cmd_lusers.cpp index 317229ceb..401b41b2e 100644 --- a/src/commands/cmd_lusers.cpp +++ b/src/commands/cmd_lusers.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /LUSERS */ -CmdResult CommandLusers::Handle (const char**, int, User *user) +CmdResult CommandLusers::Handle (const char* const*, int, User *user) { // this lusers command shows one server at all times because // a protocol module must override it to show those stats. diff --git a/src/commands/cmd_map.cpp b/src/commands/cmd_map.cpp index ce132494e..2ace70725 100644 --- a/src/commands/cmd_map.cpp +++ b/src/commands/cmd_map.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /MAP */ -CmdResult CommandMap::Handle (const char**, int, User *user) +CmdResult CommandMap::Handle (const char* const*, int, User *user) { // as with /LUSERS this does nothing without a linking // module to override its behaviour and display something diff --git a/src/commands/cmd_mode.cpp b/src/commands/cmd_mode.cpp index dafb493cb..25fec59b9 100644 --- a/src/commands/cmd_mode.cpp +++ b/src/commands/cmd_mode.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /MODE */ -CmdResult CommandMode::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandMode::Handle (const char* const* parameters, int pcnt, User *user) { ServerInstance->Modes->Process(parameters, pcnt, user, false); return CMD_SUCCESS; diff --git a/src/commands/cmd_modules.cpp b/src/commands/cmd_modules.cpp index 7649dbc91..482eb82e4 100644 --- a/src/commands/cmd_modules.cpp +++ b/src/commands/cmd_modules.cpp @@ -38,7 +38,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /MODULES */ -CmdResult CommandModules::Handle (const char**, int, User *user) +CmdResult CommandModules::Handle (const char* const*, int, User *user) { std::vector module_names = ServerInstance->Modules->GetAllModuleNames(0); diff --git a/src/commands/cmd_motd.cpp b/src/commands/cmd_motd.cpp index 6875ca0ed..b6584303d 100644 --- a/src/commands/cmd_motd.cpp +++ b/src/commands/cmd_motd.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /MOTD */ -CmdResult CommandMotd::Handle (const char**, int, User *user) +CmdResult CommandMotd::Handle (const char* const*, int, User *user) { user->ShowMOTD(); return CMD_SUCCESS; diff --git a/src/commands/cmd_names.cpp b/src/commands/cmd_names.cpp index bfde4e40a..1c5327327 100644 --- a/src/commands/cmd_names.cpp +++ b/src/commands/cmd_names.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** Handle /NAMES */ -CmdResult CommandNames::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandNames::Handle (const char* const* parameters, int pcnt, User *user) { Channel* c; diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp index 5a7ed846a..2caa9b25a 100644 --- a/src/commands/cmd_nick.cpp +++ b/src/commands/cmd_nick.cpp @@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) * for the client introduction code in here, youre in the wrong place. * You need to look in the spanningtree module for this! */ -CmdResult CommandNick::Handle (const char** parameters, int, User *user) +CmdResult CommandNick::Handle (const char* const* parameters, int, User *user) { char oldnick[NICKMAX]; diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index 9a5248c0f..5822551da 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -20,7 +20,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandNotice(Instance); } -CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User *user) { User *dest; Channel *chan; @@ -38,26 +38,27 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) FOREACH_RESULT(I_OnUserPreNotice,OnUserPreNotice(user,(void*)parameters[0],TYPE_SERVER,temp,0,exempt_list)); if (MOD_RESULT) return CMD_FAILURE; - parameters[1] = temp.c_str(); - // notice to server mask + const char* text = temp.c_str(); const char* servermask = parameters[0] + 1; - FOREACH_MOD(I_OnText,OnText(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,exempt_list)); + + FOREACH_MOD(I_OnText,OnText(user,(void*)parameters[0],TYPE_SERVER,text,0,exempt_list)); if (match(ServerInstance->Config->ServerName,servermask)) { - user->SendAll("NOTICE", "%s", parameters[1]); + user->SendAll("NOTICE", "%s", text); } - FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,exempt_list)); + FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,(void*)parameters[0],TYPE_SERVER,text,0,exempt_list)); return CMD_SUCCESS; } char status = 0; - if ((*parameters[0] == '@') || (*parameters[0] == '%') || (*parameters[0] == '+')) + const char* target = parameters[0]; + if ((*target == '@') || (*target == '%') || (*target == '+')) { - status = *parameters[0]; - parameters[0]++; + status = *target; + target++; } - if (*parameters[0] == '#') + if (*target == '#') { - chan = ServerInstance->FindChan(parameters[0]); + chan = ServerInstance->FindChan(target); exempt_list[user] = user->nick; @@ -83,7 +84,7 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) if (MOD_RESULT) { return CMD_FAILURE; } - parameters[1] = temp.c_str(); + const char* text = temp.c_str(); if (temp.empty()) { @@ -91,30 +92,30 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) return CMD_FAILURE; } - FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,parameters[1],status,exempt_list)); + FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,text,status,exempt_list)); if (status) { if (ServerInstance->Config->UndernetMsgPrefix) { - chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%c %s", status, chan->name, status, parameters[1]); + chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%c %s", status, chan->name, status, text); } else { - chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%s", status, chan->name, parameters[1]); + chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%s", status, chan->name, text); } } else { - chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %s :%s", chan->name, parameters[1]); + chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %s :%s", chan->name, text); } - FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,chan,TYPE_CHANNEL,parameters[1],status,exempt_list)); + FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,chan,TYPE_CHANNEL,text,status,exempt_list)); } else { /* no such nick/channel */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]); + user->WriteServ("401 %s %s :No such nick/channel",user->nick, target); return CMD_FAILURE; } return CMD_SUCCESS; @@ -158,17 +159,17 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) if (MOD_RESULT) { return CMD_FAILURE; } - parameters[1] = (char*)temp.c_str(); + const char* text = temp.c_str(); - FOREACH_MOD(I_OnText,OnText(user,dest,TYPE_USER,parameters[1],0,exempt_list)); + FOREACH_MOD(I_OnText,OnText(user,dest,TYPE_USER,text,0,exempt_list)); if (IS_LOCAL(dest)) { // direct write, same server - user->WriteTo(dest, "NOTICE %s :%s", dest->nick, parameters[1]); + user->WriteTo(dest, "NOTICE %s :%s", dest->nick, text); } - FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,dest,TYPE_USER,parameters[1],0,exempt_list)); + FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,dest,TYPE_USER,text,0,exempt_list)); } else { diff --git a/src/commands/cmd_oper.cpp b/src/commands/cmd_oper.cpp index 4d4c54932..608d04ba6 100644 --- a/src/commands/cmd_oper.cpp +++ b/src/commands/cmd_oper.cpp @@ -35,7 +35,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandOper(Instance); } -CmdResult CommandOper::Handle (const char** parameters, int, User *user) +CmdResult CommandOper::Handle (const char* const* parameters, int, User *user) { char LoginName[MAXBUF]; char Password[MAXBUF]; diff --git a/src/commands/cmd_part.cpp b/src/commands/cmd_part.cpp index 5137a32ca..002ae722b 100644 --- a/src/commands/cmd_part.cpp +++ b/src/commands/cmd_part.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPart(Instance); } -CmdResult CommandPart::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandPart::Handle (const char* const* parameters, int pcnt, User *user) { std::string reason; diff --git a/src/commands/cmd_pass.cpp b/src/commands/cmd_pass.cpp index 94a7c6e87..fc09d2a41 100644 --- a/src/commands/cmd_pass.cpp +++ b/src/commands/cmd_pass.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPass(Instance); } -CmdResult CommandPass::Handle (const char** parameters, int, User *user) +CmdResult CommandPass::Handle (const char* const* parameters, int, User *user) { // Check to make sure they havnt registered -- Fix by FCS if (user->registered == REG_ALL) diff --git a/src/commands/cmd_ping.cpp b/src/commands/cmd_ping.cpp index e989f057a..3aeafe15e 100644 --- a/src/commands/cmd_ping.cpp +++ b/src/commands/cmd_ping.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPing(Instance); } -CmdResult CommandPing::Handle (const char** parameters, int, User *user) +CmdResult CommandPing::Handle (const char* const* parameters, int, User *user) { user->WriteServ("PONG %s :%s",ServerInstance->Config->ServerName,parameters[0]); return CMD_SUCCESS; diff --git a/src/commands/cmd_pong.cpp b/src/commands/cmd_pong.cpp index 05ee55378..51c951eba 100644 --- a/src/commands/cmd_pong.cpp +++ b/src/commands/cmd_pong.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPong(Instance); } -CmdResult CommandPong::Handle (const char**, int, User *user) +CmdResult CommandPong::Handle (const char* const*, int, User *user) { // set the user as alive so they survive to next ping user->lastping = 1; diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp index f02700659..e78e2208a 100644 --- a/src/commands/cmd_privmsg.cpp +++ b/src/commands/cmd_privmsg.cpp @@ -20,7 +20,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPrivmsg(Instance); } -CmdResult CommandPrivmsg::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandPrivmsg::Handle (const char* const* parameters, int pcnt, User *user) { User *dest; Channel *chan; @@ -38,26 +38,26 @@ CmdResult CommandPrivmsg::Handle (const char** parameters, int pcnt, User *user) FOREACH_RESULT(I_OnUserPreMessage,OnUserPreMessage(user,(void*)parameters[0],TYPE_SERVER,temp,0,except_list)); if (MOD_RESULT) return CMD_FAILURE; - parameters[1] = temp.c_str(); - // notice to server mask + const char* text = temp.c_str(); const char* servermask = parameters[0] + 1; - FOREACH_MOD(I_OnText,OnText(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,except_list)); + FOREACH_MOD(I_OnText,OnText(user,(void*)parameters[0],TYPE_SERVER,text,0,except_list)); if (match(ServerInstance->Config->ServerName,servermask)) { - user->SendAll("PRIVMSG", "%s", parameters[1]); + user->SendAll("PRIVMSG", "%s", text); } - FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,except_list)); + FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,(void*)parameters[0],TYPE_SERVER,text,0,except_list)); return CMD_SUCCESS; } char status = 0; - if ((*parameters[0] == '@') || (*parameters[0] == '%') || (*parameters[0] == '+')) + const char* target = parameters[0]; + if ((*target == '@') || (*target == '%') || (*target == '+')) { - status = *parameters[0]; - parameters[0]++; + status = *target; + target++; } - if (parameters[0][0] == '#') + if (*target == '#') { - chan = ServerInstance->FindChan(parameters[0]); + chan = ServerInstance->FindChan(target); except_list[user] = user->nick; @@ -83,7 +83,7 @@ CmdResult CommandPrivmsg::Handle (const char** parameters, int pcnt, User *user) if (MOD_RESULT) { return CMD_FAILURE; } - parameters[1] = temp.c_str(); + const char* text = temp.c_str(); /* Check again, a module may have zapped the input string */ if (temp.empty()) @@ -92,30 +92,30 @@ CmdResult CommandPrivmsg::Handle (const char** parameters, int pcnt, User *user) return CMD_FAILURE; } - FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,parameters[1],status,except_list)); + FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,text,status,except_list)); if (status) { if (ServerInstance->Config->UndernetMsgPrefix) { - chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%c %s", status, chan->name, status, parameters[1]); + chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%c %s", status, chan->name, status, text); } else { - chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%s", status, chan->name, parameters[1]); + chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%s", status, chan->name, text); } } else { - chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %s :%s", chan->name, parameters[1]); + chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %s :%s", chan->name, text); } - FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,chan,TYPE_CHANNEL,parameters[1],status,except_list)); + FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,chan,TYPE_CHANNEL,text,status,except_list)); } else { /* no such nick/channel */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]); + user->WriteServ("401 %s %s :No such nick/channel",user->nick, target); return CMD_FAILURE; } return CMD_SUCCESS; @@ -166,17 +166,17 @@ CmdResult CommandPrivmsg::Handle (const char** parameters, int pcnt, User *user) if (MOD_RESULT) { return CMD_FAILURE; } - parameters[1] = (char*)temp.c_str(); + const char* text = temp.c_str(); - FOREACH_MOD(I_OnText,OnText(user,dest,TYPE_USER,parameters[1],0,except_list)); + FOREACH_MOD(I_OnText,OnText(user,dest,TYPE_USER,text,0,except_list)); if (IS_LOCAL(dest)) { // direct write, same server - user->WriteTo(dest, "PRIVMSG %s :%s", dest->nick, parameters[1]); + user->WriteTo(dest, "PRIVMSG %s :%s", dest->nick, text); } - FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,dest,TYPE_USER,parameters[1],0,except_list)); + FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,dest,TYPE_USER,text,0,except_list)); } else { diff --git a/src/commands/cmd_qline.cpp b/src/commands/cmd_qline.cpp index 2c3647d9f..97d26ba9f 100644 --- a/src/commands/cmd_qline.cpp +++ b/src/commands/cmd_qline.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandQline(Instance); } -CmdResult CommandQline::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandQline::Handle (const char* const* parameters, int pcnt, User *user) { if (pcnt >= 3) { diff --git a/src/commands/cmd_quit.cpp b/src/commands/cmd_quit.cpp index 43483fa17..29433ff5a 100644 --- a/src/commands/cmd_quit.cpp +++ b/src/commands/cmd_quit.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandQuit(Instance); } -CmdResult CommandQuit::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandQuit::Handle (const char* const* parameters, int pcnt, User *user) { std::string quitmsg; diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp index d0e1882a7..760689eb0 100644 --- a/src/commands/cmd_rehash.cpp +++ b/src/commands/cmd_rehash.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandRehash(Instance); } -CmdResult CommandRehash::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandRehash::Handle (const char* const* parameters, int pcnt, User *user) { user->WriteServ("382 %s %s :Rehashing",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName)); std::string parameter; diff --git a/src/commands/cmd_reloadmodule.cpp b/src/commands/cmd_reloadmodule.cpp index b5b6cbef4..015160257 100644 --- a/src/commands/cmd_reloadmodule.cpp +++ b/src/commands/cmd_reloadmodule.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandReloadmodule(Instance); } -CmdResult CommandReloadmodule::Handle (const char** parameters, int, User *user) +CmdResult CommandReloadmodule::Handle (const char* const* parameters, int, User *user) { if (ServerInstance->Modules->Unload(parameters[0])) { diff --git a/src/commands/cmd_restart.cpp b/src/commands/cmd_restart.cpp index b22bb774b..379052a1e 100644 --- a/src/commands/cmd_restart.cpp +++ b/src/commands/cmd_restart.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandRestart(Instance); } -CmdResult CommandRestart::Handle (const char** parameters, int, User *user) +CmdResult CommandRestart::Handle (const char* const* parameters, int, User *user) { ServerInstance->Log(DEFAULT,"Restart: %s",user->nick); if (!ServerInstance->PassCompare(user, ServerInstance->Config->restartpass, parameters[0], ServerInstance->Config->powerhash)) diff --git a/src/commands/cmd_rules.cpp b/src/commands/cmd_rules.cpp index d38e5eefc..685d04389 100644 --- a/src/commands/cmd_rules.cpp +++ b/src/commands/cmd_rules.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandRules(Instance); } -CmdResult CommandRules::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandRules::Handle (const char* const* parameters, int pcnt, User *user) { user->ShowRULES(); return CMD_SUCCESS; diff --git a/src/commands/cmd_server.cpp b/src/commands/cmd_server.cpp index 282f4eec5..f4c12f7e3 100644 --- a/src/commands/cmd_server.cpp +++ b/src/commands/cmd_server.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandServer(Instance); } -CmdResult CommandServer::Handle (const char**, int, User *user) +CmdResult CommandServer::Handle (const char* const*, int, User *user) { user->WriteServ("666 %s :You cannot identify as a server, you are a USER. IRC Operators informed.",user->nick); ServerInstance->SNO->WriteToSnoMask('A', "WARNING: %s attempted to issue a SERVER command and is registered as a user!", user->nick); diff --git a/src/commands/cmd_squit.cpp b/src/commands/cmd_squit.cpp index f51bc42b9..e98790380 100644 --- a/src/commands/cmd_squit.cpp +++ b/src/commands/cmd_squit.cpp @@ -24,7 +24,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandSquit(Instance); } -CmdResult CommandSquit::Handle (const char**, int, User *user) +CmdResult CommandSquit::Handle (const char* const*, int, User *user) { user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick); return CMD_FAILURE; diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 72bdc69bd..f2292c2e0 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -31,7 +31,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandStats(Instance); } -CmdResult CommandStats::Handle (const char** parameters, int /* pcnt */, User *user) +CmdResult CommandStats::Handle (const char* const* parameters, int /* pcnt */, User *user) { if (IS_LOCAL(user)) { diff --git a/src/commands/cmd_time.cpp b/src/commands/cmd_time.cpp index f5bb86b3d..a62d46d7a 100644 --- a/src/commands/cmd_time.cpp +++ b/src/commands/cmd_time.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandTime(Instance); } -CmdResult CommandTime::Handle (const char**, int, User *user) +CmdResult CommandTime::Handle (const char* const*, int, User *user) { struct tm* timeinfo; time_t local = ServerInstance->Time(); diff --git a/src/commands/cmd_topic.cpp b/src/commands/cmd_topic.cpp index 3e7f23c65..46c26806f 100644 --- a/src/commands/cmd_topic.cpp +++ b/src/commands/cmd_topic.cpp @@ -20,7 +20,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandTopic(Instance); } -CmdResult CommandTopic::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandTopic::Handle (const char* const* parameters, int pcnt, User *user) { Channel* Ptr; diff --git a/src/commands/cmd_trace.cpp b/src/commands/cmd_trace.cpp index 1b7f83694..5480c03a5 100644 --- a/src/commands/cmd_trace.cpp +++ b/src/commands/cmd_trace.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) /** XXX: This is crap. someone fix this when you have time, to be more useful. */ -CmdResult CommandTrace::Handle (const char**, int, User *user) +CmdResult CommandTrace::Handle (const char* const*, int, User *user) { /*for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) { diff --git a/src/commands/cmd_unloadmodule.cpp b/src/commands/cmd_unloadmodule.cpp index 6d95ee656..a01623b64 100644 --- a/src/commands/cmd_unloadmodule.cpp +++ b/src/commands/cmd_unloadmodule.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandUnloadmodule(Instance); } -CmdResult CommandUnloadmodule::Handle (const char** parameters, int, User *user) +CmdResult CommandUnloadmodule::Handle (const char* const* parameters, int, User *user) { if (ServerInstance->Modules->Unload(parameters[0])) { diff --git a/src/commands/cmd_user.cpp b/src/commands/cmd_user.cpp index be49deeac..8f056d83f 100644 --- a/src/commands/cmd_user.cpp +++ b/src/commands/cmd_user.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandUser(Instance); } -CmdResult CommandUser::Handle (const char** parameters, int, User *user) +CmdResult CommandUser::Handle (const char* const* parameters, int, User *user) { /* A user may only send the USER command once */ if (!(user->registered & REG_USER)) diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index d6b34456f..c8a33535f 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandUserhost(Instance); } -CmdResult CommandUserhost::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandUserhost::Handle (const char* const* parameters, int pcnt, User *user) { std::string retbuf = std::string("302 ") + user->nick + " :"; diff --git a/src/commands/cmd_version.cpp b/src/commands/cmd_version.cpp index b65c885f7..51e9e771a 100644 --- a/src/commands/cmd_version.cpp +++ b/src/commands/cmd_version.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandVersion(Instance); } -CmdResult CommandVersion::Handle (const char**, int, User *user) +CmdResult CommandVersion::Handle (const char* const*, int, User *user) { user->WriteServ("351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str()); ServerInstance->Config->Send005(user); diff --git a/src/commands/cmd_wallops.cpp b/src/commands/cmd_wallops.cpp index 0283122cd..cd8995ad8 100644 --- a/src/commands/cmd_wallops.cpp +++ b/src/commands/cmd_wallops.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandWallops(Instance); } -CmdResult CommandWallops::Handle (const char** parameters, int, User *user) +CmdResult CommandWallops::Handle (const char* const* parameters, int, User *user) { user->WriteWallOps(std::string(parameters[0])); FOREACH_MOD(I_OnWallops,OnWallops(user,parameters[0])); diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index a54623672..d26cd918d 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -165,7 +165,7 @@ void CommandWho::SendWhoLine(User* user, const std::string &initial, Channel* ch whoresults.push_back(wholine); } -CmdResult CommandWho::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandWho::Handle (const char* const* parameters, int pcnt, User *user) { /* * XXX - RFC says: diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 11456ca1b..889fa3e71 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -91,7 +91,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandWhois(Instance); } -CmdResult CommandWhois::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandWhois::Handle (const char* const* parameters, int pcnt, User *user) { User *dest; int userindex = 0; diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index 7b44a0290..fd9544853 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -28,7 +28,7 @@ CommandWhowas::CommandWhowas(InspIRCd* Instance) : Command(Instance, "WHOWAS", 0 Instance->Timers->AddTimer(timer); } -CmdResult CommandWhowas::Handle (const char** parameters, int, User* user) +CmdResult CommandWhowas::Handle (const char* const* parameters, int, User* user) { /* if whowas disabled in config */ if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0) diff --git a/src/commands/cmd_zline.cpp b/src/commands/cmd_zline.cpp index 2a12ee5b5..c4bc750c7 100644 --- a/src/commands/cmd_zline.cpp +++ b/src/commands/cmd_zline.cpp @@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandZline(Instance); } -CmdResult CommandZline::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandZline::Handle (const char* const* parameters, int pcnt, User *user) { std::string target = parameters[0]; diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 71d9f0ca9..ebd03fed2 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -396,7 +396,7 @@ irc::stringjoiner::stringjoiner(const std::string &seperator, const std::dequeParser->CallHandler(commandname,parameters,pcnt,user); } @@ -739,7 +739,7 @@ void InspIRCd::AddCommand(Command *f) } } -void InspIRCd::SendMode(const char** parameters, int pcnt, User *user) +void InspIRCd::SendMode(const char* const* parameters, int pcnt, User *user) { this->Modes->Process(parameters,pcnt,user,true); } diff --git a/src/modules/extra/m_rline.cpp b/src/modules/extra/m_rline.cpp index fb8887032..189479efc 100644 --- a/src/modules/extra/m_rline.cpp +++ b/src/modules/extra/m_rline.cpp @@ -131,7 +131,7 @@ class CommandRLine : public Command this->source = "m_rline.so"; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { if (pcnt >= 3) diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 7bb5ea1f1..ac38ed61c 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -276,7 +276,7 @@ class ModuleSQLLog : public Module return 0; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated) { diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 22034303d..a1e28bafe 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -68,7 +68,7 @@ public: databaseid = Conf.ReadValue("sqloper", "dbid", 0); /* Database ID of a database configured for the service provider module */ } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { if ((validated) && (command == "OPER")) { diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp index f82537c95..312ec874b 100644 --- a/src/modules/extra/m_ssl_oper_cert.cpp +++ b/src/modules/extra/m_ssl_oper_cert.cpp @@ -33,7 +33,7 @@ class cmd_fingerprint : public Command syntax = ""; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { User* target = ServerInstance->FindNick(parameters[0]); if (target) @@ -112,7 +112,7 @@ class ModuleOperSSLCert : public Module return false; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { irc::string cmd = command.c_str(); diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index 00fc2ee5b..b16c7f0ee 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -33,7 +33,7 @@ class cmd_sslinfo : public Command this->syntax = ""; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { User* target = ServerInstance->FindNick(parameters[0]); ssl_cert* cert; diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 1e7c87241..e1600e9c6 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -126,7 +126,7 @@ class ModuleAlias : public Module } } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { User *u = NULL; diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index b5f4968d0..83dbe53b8 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -25,7 +25,7 @@ class CommandAlltime : public Command translation.push_back(TR_END); } - CmdResult Handle(const char **parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { char fmtdate[64]; char fmtdate2[64]; diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index 2db7f58f3..53d267228 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -38,7 +38,7 @@ class ModuleAntiBear : public Module } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { if (command == "NOTICE" && !validated && pcnt > 1 && user->GetExt("antibear_timewait")) { diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp index 80b55ea78..5a1e9a361 100644 --- a/src/modules/m_antibottler.cpp +++ b/src/modules/m_antibottler.cpp @@ -37,7 +37,7 @@ class ModuleAntiBottler : public Module return Version(1,1,0,1,VF_VENDOR,API_VERSION); } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { char data[MAXBUF]; strlcpy(data,original_line.c_str(),MAXBUF); diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 08bdcba33..8d66ff052 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -84,7 +84,7 @@ class ModuleBlockAmsg : public Module action = IBLOCK_KILLOPERS; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line) { // Don't do anything with unregistered users, or remote ones. if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user)) diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 2783cd484..e6b740520 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -93,7 +93,7 @@ public: * /accept nick1,nick2,nick3 * * to add 3 nicks and then show your list */ - CmdResult Handle(const char** parameters, int pcnt, User* user) + CmdResult Handle(const char* const* parameters, int pcnt, User* user) { if (pcnt < 1) { diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index f13a3b97a..f74c5d58e 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -54,7 +54,7 @@ class CommandCban : public Command TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END); } - CmdResult Handle(const char** parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { /* syntax: CBAN #channel time :reason goes here */ /* 'time' is a human-readable timestring, like 2d3h2s. */ diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index c1f6cf89e..633e95af9 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -61,7 +61,7 @@ class CommandWebirc : public Command this->source = "m_cgiirc.so"; this->syntax = "password client hostname ip"; } - CmdResult Handle(const char** parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { if(user->registered == REG_ALL) return CMD_FAILURE; diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index e678ec1cb..14468ab36 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -27,7 +27,7 @@ class CommandCheck : public Command syntax = "|||"; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { User *targuser; Channel *targchan; diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 005e71c8f..913921e8c 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -29,7 +29,7 @@ class CommandChghost : public Command TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } - CmdResult Handle(const char** parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { const char * x = parameters[1]; diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 8e47e87e6..6f8528ef0 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -27,7 +27,7 @@ class CommandChgident : public Command TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } - CmdResult Handle(const char** parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index f4d41ab8d..b2fafbf38 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -27,7 +27,7 @@ class CommandChgname : public Command TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } - CmdResult Handle(const char** parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp index eb2c6cd3d..a2b4e35fa 100644 --- a/src/modules/m_clones.cpp +++ b/src/modules/m_clones.cpp @@ -27,7 +27,7 @@ class CommandClones : public Command syntax = ""; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { std::string clonesstr = "304 " + std::string(user->nick) + " :CLONES"; diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp index da3760de1..ebffc6864 100644 --- a/src/modules/m_close.cpp +++ b/src/modules/m_close.cpp @@ -24,7 +24,7 @@ class CommandClose : public Command this->source = "m_close.so"; } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { std::map closed; diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index 3b63f07a7..0a9ce3b8f 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -69,7 +69,7 @@ class ModuleWaitPong : public Module return 0; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User* user, bool validated, const std::string &original_line) + virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User* user, bool validated, const std::string &original_line) { if (command == "PONG") { diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 6bde81c67..185055a5d 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -43,7 +43,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist) return false; } - CmdResult Handle(const char** parameters, int pcnt, User* user) + CmdResult Handle(const char* const* parameters, int pcnt, User* user) { if (!IS_LOCAL(user)) return CMD_LOCALONLY; diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index e8714bb5c..882d4232e 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -27,7 +27,7 @@ class CommandCycle : public Command TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } - CmdResult Handle (const char** parameters, int pcnt, User *user) + CmdResult Handle (const char* const* parameters, int pcnt, User *user) { Channel* channel = ServerInstance->FindChan(parameters[0]); std::string reason = ConvToStr("Cycling"); diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index cdc8dc9c1..572188b7c 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -54,7 +54,7 @@ class CommandDccallow : public Command /* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */ } - CmdResult Handle(const char **parameters, int pcnt, User *user) + CmdResult Handle(const char* const* parameters, int pcnt, User *user) { /* syntax: DCCALLOW [+|-] (