summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-20 19:07:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-20 19:07:07 +0000
commitdd36852a52e8541306b76c5b88bce8ab9b36654c (patch)
tree045b4eb051d43ca64f395b15f7b190f2159d51f0 /src
parent5509c602cb8783ceadf8028ff80c5dbeb4818704 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp8
-rw-r--r--src/commands/cmd_admin.cpp2
-rw-r--r--src/commands/cmd_away.cpp2
-rw-r--r--src/commands/cmd_clearcache.cpp2
-rw-r--r--src/commands/cmd_commands.cpp2
-rw-r--r--src/commands/cmd_connect.cpp2
-rw-r--r--src/commands/cmd_die.cpp2
-rw-r--r--src/commands/cmd_eline.cpp2
-rw-r--r--src/commands/cmd_gline.cpp2
-rw-r--r--src/commands/cmd_info.cpp2
-rw-r--r--src/commands/cmd_invite.cpp2
-rw-r--r--src/commands/cmd_ison.cpp2
-rw-r--r--src/commands/cmd_join.cpp2
-rw-r--r--src/commands/cmd_kick.cpp2
-rw-r--r--src/commands/cmd_kill.cpp2
-rw-r--r--src/commands/cmd_kline.cpp2
-rw-r--r--src/commands/cmd_links.cpp2
-rw-r--r--src/commands/cmd_list.cpp2
-rw-r--r--src/commands/cmd_loadmodule.cpp2
-rw-r--r--src/commands/cmd_lusers.cpp2
-rw-r--r--src/commands/cmd_map.cpp2
-rw-r--r--src/commands/cmd_mode.cpp2
-rw-r--r--src/commands/cmd_modules.cpp2
-rw-r--r--src/commands/cmd_motd.cpp2
-rw-r--r--src/commands/cmd_names.cpp2
-rw-r--r--src/commands/cmd_nick.cpp2
-rw-r--r--src/commands/cmd_notice.cpp45
-rw-r--r--src/commands/cmd_oper.cpp2
-rw-r--r--src/commands/cmd_part.cpp2
-rw-r--r--src/commands/cmd_pass.cpp2
-rw-r--r--src/commands/cmd_ping.cpp2
-rw-r--r--src/commands/cmd_pong.cpp2
-rw-r--r--src/commands/cmd_privmsg.cpp44
-rw-r--r--src/commands/cmd_qline.cpp2
-rw-r--r--src/commands/cmd_quit.cpp2
-rw-r--r--src/commands/cmd_rehash.cpp2
-rw-r--r--src/commands/cmd_reloadmodule.cpp2
-rw-r--r--src/commands/cmd_restart.cpp2
-rw-r--r--src/commands/cmd_rules.cpp2
-rw-r--r--src/commands/cmd_server.cpp2
-rw-r--r--src/commands/cmd_squit.cpp2
-rw-r--r--src/commands/cmd_stats.cpp2
-rw-r--r--src/commands/cmd_time.cpp2
-rw-r--r--src/commands/cmd_topic.cpp2
-rw-r--r--src/commands/cmd_trace.cpp2
-rw-r--r--src/commands/cmd_unloadmodule.cpp2
-rw-r--r--src/commands/cmd_user.cpp2
-rw-r--r--src/commands/cmd_userhost.cpp2
-rw-r--r--src/commands/cmd_version.cpp2
-rw-r--r--src/commands/cmd_wallops.cpp2
-rw-r--r--src/commands/cmd_who.cpp2
-rw-r--r--src/commands/cmd_whois.cpp2
-rw-r--r--src/commands/cmd_whowas.cpp2
-rw-r--r--src/commands/cmd_zline.cpp2
-rw-r--r--src/hashcomp.cpp2
-rw-r--r--src/mode.cpp2
-rw-r--r--src/modules.cpp8
-rw-r--r--src/modules/extra/m_rline.cpp2
-rw-r--r--src/modules/extra/m_sqllog.cpp2
-rw-r--r--src/modules/extra/m_sqloper.cpp2
-rw-r--r--src/modules/extra/m_ssl_oper_cert.cpp4
-rw-r--r--src/modules/extra/m_sslinfo.cpp2
-rw-r--r--src/modules/m_alias.cpp2
-rw-r--r--src/modules/m_alltime.cpp2
-rw-r--r--src/modules/m_antibear.cpp2
-rw-r--r--src/modules/m_antibottler.cpp2
-rw-r--r--src/modules/m_blockamsg.cpp2
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_cban.cpp2
-rw-r--r--src/modules/m_cgiirc.cpp2
-rw-r--r--src/modules/m_check.cpp2
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_chgident.cpp2
-rw-r--r--src/modules/m_chgname.cpp2
-rw-r--r--src/modules/m_clones.cpp2
-rw-r--r--src/modules/m_close.cpp2
-rw-r--r--src/modules/m_conn_waitpong.cpp2
-rw-r--r--src/modules/m_customtitle.cpp2
-rw-r--r--src/modules/m_cycle.cpp2
-rw-r--r--src/modules/m_dccallow.cpp2
-rw-r--r--src/modules/m_devoice.cpp2
-rw-r--r--src/modules/m_filter.h6
-rw-r--r--src/modules/m_globalload.cpp6
-rw-r--r--src/modules/m_globops.cpp2
-rw-r--r--src/modules/m_helpop.cpp2
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_knock.cpp2
-rw-r--r--src/modules/m_lockserv.cpp4
-rw-r--r--src/modules/m_namesx.cpp2
-rw-r--r--src/modules/m_nicklock.cpp4
-rw-r--r--src/modules/m_operlog.cpp2
-rw-r--r--src/modules/m_opermotd.cpp2
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_password_hash.cpp2
-rw-r--r--src/modules/m_randquote.cpp2
-rw-r--r--src/modules/m_remove.cpp6
-rw-r--r--src/modules/m_safelist.cpp4
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_samode.cpp2
-rw-r--r--src/modules/m_sanick.cpp2
-rw-r--r--src/modules/m_sapart.cpp2
-rw-r--r--src/modules/m_saquit.cpp2
-rw-r--r--src/modules/m_securelist.cpp2
-rw-r--r--src/modules/m_sethost.cpp2
-rw-r--r--src/modules/m_setident.cpp2
-rw-r--r--src/modules/m_setidle.cpp2
-rw-r--r--src/modules/m_setname.cpp2
-rw-r--r--src/modules/m_silence.cpp2
-rw-r--r--src/modules/m_silence_ext.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp8
-rw-r--r--src/modules/m_spanningtree/main.h28
-rw-r--r--src/modules/m_spanningtree/override_admin.cpp2
-rw-r--r--src/modules/m_spanningtree/override_map.cpp2
-rw-r--r--src/modules/m_spanningtree/override_modules.cpp2
-rw-r--r--src/modules/m_spanningtree/override_motd.cpp2
-rw-r--r--src/modules/m_spanningtree/override_squit.cpp2
-rw-r--r--src/modules/m_spanningtree/override_stats.cpp2
-rw-r--r--src/modules/m_spanningtree/override_time.cpp2
-rw-r--r--src/modules/m_spanningtree/override_whois.cpp2
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp2
-rw-r--r--src/modules/m_spanningtree/precommand.cpp2
-rw-r--r--src/modules/m_spanningtree/rconnect.cpp2
-rw-r--r--src/modules/m_spanningtree/rconnect.h2
-rw-r--r--src/modules/m_spanningtree/rsquit.cpp2
-rw-r--r--src/modules/m_spanningtree/rsquit.h2
-rw-r--r--src/modules/m_svshold.cpp2
-rw-r--r--src/modules/m_swhois.cpp4
-rw-r--r--src/modules/m_taxonomy.cpp2
-rw-r--r--src/modules/m_testcommand.cpp2
-rw-r--r--src/modules/m_timedbans.cpp2
-rw-r--r--src/modules/m_tline.cpp2
-rw-r--r--src/modules/m_uhnames.cpp2
-rw-r--r--src/modules/m_uninvite.cpp2
-rw-r--r--src/modules/m_userip.cpp2
-rw-r--r--src/modules/m_vhost.cpp2
-rw-r--r--src/modules/m_watch.cpp4
136 files changed, 213 insertions, 212 deletions
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<User*,User*> 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<std::string> 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::deque<s
joined.append(sequence[end]);
}
-irc::stringjoiner::stringjoiner(const std::string &seperator, const char** sequence, int begin, int end)
+irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end)
{
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
diff --git a/src/mode.cpp b/src/mode.cpp
index e58dd6762..5a0cdbf1e 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -289,7 +289,7 @@ void ModeParser::DisplayCurrentModes(User *user, User* targetuser, Channel* targ
return;
}
-void ModeParser::Process(const char** parameters, int pcnt, User *user, bool servermode)
+void ModeParser::Process(const char* const* parameters, int pcnt, User *user, bool servermode)
{
std::string target = parameters[0];
ModeType type = MODETYPE_USER;
diff --git a/src/modules.cpp b/src/modules.cpp
index 31d5c524d..81be24154 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -134,8 +134,8 @@ int Module::OnKill(User*, User*, const std::string&) { return 0; }
void Module::OnLoadModule(Module*, const std::string&) { }
void Module::OnUnloadModule(Module*, const std::string&) { }
void Module::OnBackgroundTimer(time_t) { }
-int Module::OnPreCommand(const std::string&, const char**, int, User *, bool, const std::string&) { return 0; }
-void Module::OnPostCommand(const std::string&, const char**, int, User *, CmdResult, const std::string&) { }
+int Module::OnPreCommand(const std::string&, const char* const*, int, User *, bool, const std::string&) { return 0; }
+void Module::OnPostCommand(const std::string&, const char* const*, int, User *, CmdResult, const std::string&) { }
bool Module::OnCheckReady(User*) { return true; }
int Module::OnUserRegister(User*) { return 0; }
int Module::OnUserPreKick(User*, User*, Channel*, const std::string&) { return 0; }
@@ -720,7 +720,7 @@ bool InspIRCd::MatchText(const std::string &sliteral, const std::string &spatter
return match(sliteral.c_str(),spattern.c_str());
}
-CmdResult InspIRCd::CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, User* user)
+CmdResult InspIRCd::CallCommandHandler(const std::string &commandname, const char* const* parameters, int pcnt, User* user)
{
return this->Parser->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 = "<nickname>";
}
- 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 = "<nick>";
}
- 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 = "<nickname>|<ip>|<hostmask>|<channel>";
}
- 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 = "<limit>";
}
- 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<std::string,int> 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 [+|-]<nick> (<time>) */
if (!pcnt)
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 042718256..d4d018e93 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -32,7 +32,7 @@ class CommandDevoice : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
Channel* c = ServerInstance->FindChan(parameters[0]);
if (c && c->HasUser(user))
diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h
index 02adc7809..1be1f85ff 100644
--- a/src/modules/m_filter.h
+++ b/src/modules/m_filter.h
@@ -113,7 +113,7 @@ protected:
virtual void OnSyncOtherMetaData(Module* proto, void* opaque, bool displayable = false);
virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata);
virtual int OnStats(char symbol, User* user, string_list &results) = 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);
bool AppliesToMe(User* user, FilterResult* filter, int flags);
};
@@ -127,7 +127,7 @@ class CommandFilter : public Command
this->syntax = "<filter-definition> <type> <flags> [<gline-duration>] :<reason>";
}
- CmdResult Handle(const char** parameters, int pcnt, User *user)
+ CmdResult Handle(const char* const* parameters, int pcnt, User *user)
{
if (pcnt == 1)
{
@@ -295,7 +295,7 @@ int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::stri
return 0;
}
-int FilterBase::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+int FilterBase::OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
flags = 0;
if ((validated == 1) && (IS_LOCAL(user)))
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 0d834a4bb..8c07205dc 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -27,7 +27,7 @@ class CommandGloadmodule : 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)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
@@ -61,7 +61,7 @@ class CommandGunloadmodule : public Command
syntax = "<modulename> [servermask]";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
@@ -95,7 +95,7 @@ class CommandGreloadmodule : public Command
syntax = "<modulename> [servermask]";
}
- CmdResult Handle(const char** parameters, int pcnt, User *user)
+ CmdResult Handle(const char* const* parameters, int pcnt, User *user)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index 661ff91dc..e932971dc 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -29,7 +29,7 @@ class CommandGlobops : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
std::string line = "From " + std::string(user->nick) + ": ";
for (int i = 0; i < pcnt; i++)
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index ae6fcc87c..34bc9c62b 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -58,7 +58,7 @@ class CommandHelpop : public Command
syntax = "<any-text>";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
irc::string parameter("start");
if (pcnt > 0)
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 327fdc8f1..f744a3eea 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -37,7 +37,7 @@ class CommandJumpserver : public Command
redirect_all_immediately = redirect_new_users = false;
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
int n_done = 0;
reason = (pcnt < 4) ? "Please use this server/port instead" : parameters[3];
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index b974c0688..a2fd985aa 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -27,7 +27,7 @@ class CommandKnock : 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* c = ServerInstance->FindChan(parameters[0]);
std::string line;
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp
index dfda9aaf7..9d7a33ad6 100644
--- a/src/modules/m_lockserv.cpp
+++ b/src/modules/m_lockserv.cpp
@@ -34,7 +34,7 @@ public:
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
locked = true;
user->WriteServ("988 %s %s :Closed for new connections", user->nick, user->server);
@@ -57,7 +57,7 @@ public:
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
locked = false;
user->WriteServ("989 %s %s :Open for new connections", user->nick, user->server);
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index 32906ed44..83541417b 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -49,7 +49,7 @@ class ModuleNamesX : public Module
output.append(" NAMESX");
}
- 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 c = command.c_str();
/* We don't actually create a proper command handler class for PROTOCTL,
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 932a9d05b..24d319ca8 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -28,7 +28,7 @@ class CommandNicklock : 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* target = ServerInstance->FindNick(parameters[0]);
irc::string server;
@@ -81,7 +81,7 @@ class CommandNickunlock : public Command
syntax = "<locked-nick>";
}
- 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)
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index 02c6a30dd..eac5a9407 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -37,7 +37,7 @@ class ModuleOperLog : 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 59e03a901..d7930b74a 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -49,7 +49,7 @@ class CommandOpermotd : public Command
syntax = "[<servername>]";
}
- CmdResult Handle (const char** parameters, int pcnt, User* user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User* user)
{
return ShowOperMOTD(user);
}
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 253b200bc..ff0efe561 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -59,7 +59,7 @@ class ModuleOverride : public Module
}
- 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)
{
if ((NoisyOverride) && (OverriddenMode) && (irc::string(command.c_str()) == "MODE") && (result == CMD_SUCCESS))
{
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp
index 205df724e..0db1147dd 100644
--- a/src/modules/m_password_hash.cpp
+++ b/src/modules/m_password_hash.cpp
@@ -52,7 +52,7 @@ class CommandMkpasswd : public Command
}
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
MakeHash(user, parameters[0], parameters[1]);
/* NOTE: Don't propagate this across the network!
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 1c794f7dd..b030b4305 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -31,7 +31,7 @@ class CommandRandquote : public Command
this->source = "m_randquote.so";
}
- CmdResult Handle (const char** parameters, int pcntl, User *user)
+ CmdResult Handle (const char* const* parameters, int pcntl, User *user)
{
std::string str;
int fsize;
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 5e2265f2d..868599948 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -69,7 +69,7 @@ class RemoveBase
}
}
- CmdResult Handle (const char** parameters, int pcnt, User *user, bool neworder)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user, bool neworder)
{
const char* channame;
const char* username;
@@ -213,7 +213,7 @@ class CommandRemove : public Command, public RemoveBase
TRANSLATE4(TR_NICK, 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)
{
return RemoveBase::Handle(parameters, pcnt, user, false);
}
@@ -230,7 +230,7 @@ class CommandFpart : public Command, public RemoveBase
syntax = "<channel> <nick> [<reason>]";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
return RemoveBase::Handle(parameters, pcnt, user, true);
}
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index b04701f5d..889ecb0a6 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -69,7 +69,7 @@ class ModuleSafeList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -86,7 +86,7 @@ class ModuleSafeList : public Module
* HandleList()
* Handle (override) the LIST command.
*/
- int HandleList(const char** parameters, int pcnt, User* user)
+ int HandleList(const char* const* parameters, int pcnt, User* user)
{
int minusers = 0, maxusers = 0;
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 5b7ead9b4..4bc5d31a2 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -27,7 +27,7 @@ class CommandSajoin : 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]);
if (dest)
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 7db43661d..7a3a51585 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -26,7 +26,7 @@ class CommandSamode : public Command
syntax = "<target> <modes> {<mode-parameters>}";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
/*
* Handles an SAMODE request. Notifies all +s users.
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index c1115827a..2f3281ba7 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -27,7 +27,7 @@ class CommandSanick : 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* target = ServerInstance->FindNick(parameters[0]);
if (target)
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index ce21b967a..1a176da85 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -27,7 +27,7 @@ class CommandSapart : public Command
TRANSLATE4(TR_NICK, 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)
{
User* dest = ServerInstance->FindNick(parameters[0]);
Channel* channel = ServerInstance->FindChan(parameters[1]);
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 82b44ede5..c1ff50dd5 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -27,7 +27,7 @@ class CommandSaquit : 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]);
if (dest)
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 57dfd3794..8ba9f9232 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -54,7 +54,7 @@ class ModuleSecureList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 2410f4140..90bd3c7cd 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -29,7 +29,7 @@ class CommandSethost : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
size_t len = 0;
for (const char* x = parameters[0]; *x; x++, len++)
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index eeed92042..966b9b602 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -27,7 +27,7 @@ class CommandSetident : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, User *user)
+ CmdResult Handle(const char* const* parameters, int pcnt, User *user)
{
if (!*parameters[0])
{
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 045ac5f4a..f6e1b8b86 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -27,7 +27,7 @@ class CommandSetidle : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
time_t idle = ServerInstance->Duration(parameters[0]);
if (idle < 1)
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index d0dce6c77..c93bf424a 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -27,7 +27,7 @@ class CommandSetname : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
if (!*parameters[0])
{
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 542dc0a04..9361b9a67 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -32,7 +32,7 @@ class CommandSilence : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
if (!pcnt)
{
diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp
index 8aec2b0ad..1467df014 100644
--- a/src/modules/m_silence_ext.cpp
+++ b/src/modules/m_silence_ext.cpp
@@ -62,7 +62,7 @@ class CommandSilence : 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)
{
if (!pcnt)
{
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 98c3758d2..119e98220 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -114,14 +114,14 @@ int ModuleSpanningTree::CountServs()
return Utils->serverlist.size();
}
-void ModuleSpanningTree::HandleLinks(const char** parameters, int pcnt, User* user)
+void ModuleSpanningTree::HandleLinks(const char* const* parameters, int pcnt, User* user)
{
ShowLinks(Utils->TreeRoot,user,0);
user->WriteServ("365 %s * :End of /LINKS list.",user->nick);
return;
}
-void ModuleSpanningTree::HandleLusers(const char** parameters, int pcnt, User* user)
+void ModuleSpanningTree::HandleLusers(const char* const* parameters, int pcnt, User* user)
{
unsigned int n_users = ServerInstance->Users->UserCount();
@@ -322,7 +322,7 @@ void ModuleSpanningTree::AutoConnectServers(time_t curtime)
}
}
-int ModuleSpanningTree::HandleVersion(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleVersion(const char* const* parameters, int pcnt, User* user)
{
// we've already checked if pcnt > 0, so this is safe
TreeServer* found = Utils->FindServerMask(parameters[0]);
@@ -392,7 +392,7 @@ void ModuleSpanningTree::RemoteMessage(User* user, const char* format, ...)
SendingRemoteMessage = false;
}
-int ModuleSpanningTree::HandleConnect(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleConnect(const char* const* parameters, int pcnt, User* user)
{
for (std::vector<Link>::iterator x = Utils->LinkBlocks.begin(); x < Utils->LinkBlocks.end(); x++)
{
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 5eeaca7b1..e8c83221e 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -75,11 +75,11 @@ class ModuleSpanningTree : public Module
/** Handle LINKS command
*/
- void HandleLinks(const char** parameters, int pcnt, User* user);
+ void HandleLinks(const char* const* parameters, int pcnt, User* user);
/** Handle LUSERS command
*/
- void HandleLusers(const char** parameters, int pcnt, User* user);
+ void HandleLusers(const char* const* parameters, int pcnt, User* user);
/** Show MAP output to a user (recursive)
*/
@@ -87,35 +87,35 @@ class ModuleSpanningTree : public Module
/** Handle remote MOTD
*/
- int HandleMotd(const char** parameters, int pcnt, User* user);
+ int HandleMotd(const char* const* parameters, int pcnt, User* user);
/** Handle remote ADMIN
*/
- int HandleAdmin(const char** parameters, int pcnt, User* user);
+ int HandleAdmin(const char* const* parameters, int pcnt, User* user);
/** Handle remote STATS
*/
- int HandleStats(const char** parameters, int pcnt, User* user);
+ int HandleStats(const char* const* parameters, int pcnt, User* user);
/** Handle MAP command
*/
- void HandleMap(const char** parameters, int pcnt, User* user);
+ void HandleMap(const char* const* parameters, int pcnt, User* user);
/** Handle SQUIT
*/
- int HandleSquit(const char** parameters, int pcnt, User* user);
+ int HandleSquit(const char* const* parameters, int pcnt, User* user);
/** Handle TIME
*/
- int HandleTime(const char** parameters, int pcnt, User* user);
+ int HandleTime(const char* const* parameters, int pcnt, User* user);
/** Handle remote WHOIS
*/
- int HandleRemoteWhois(const char** parameters, int pcnt, User* user);
+ int HandleRemoteWhois(const char* const* parameters, int pcnt, User* user);
/** Handle remote MODULES
*/
- int HandleModules(const char** parameters, int pcnt, User* user);
+ int HandleModules(const char* const* parameters, int pcnt, User* user);
/** Ping all local servers
*/
@@ -131,11 +131,11 @@ class ModuleSpanningTree : public Module
/** Handle remote VERSON
*/
- int HandleVersion(const char** parameters, int pcnt, User* user);
+ int HandleVersion(const char* const* parameters, int pcnt, User* user);
/** Handle CONNECT
*/
- int HandleConnect(const char** parameters, int pcnt, User* user);
+ int HandleConnect(const char* const* parameters, int pcnt, User* user);
/** Send out time sync to all servers
*/
@@ -157,8 +157,8 @@ class ModuleSpanningTree : public Module
** *** MODULE EVENTS ***
**/
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line);
- virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, 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);
+ virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line);
virtual void OnGetServerDescription(const std::string &servername,std::string &description);
virtual void OnUserInvite(User* source,User* dest,Channel* channel, time_t);
virtual void OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic);
diff --git a/src/modules/m_spanningtree/override_admin.cpp b/src/modules/m_spanningtree/override_admin.cpp
index e011383d2..c090cb071 100644
--- a/src/modules/m_spanningtree/override_admin.cpp
+++ b/src/modules/m_spanningtree/override_admin.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleAdmin(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleAdmin(const char* const* parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 9b117272a..853010b4d 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -109,7 +109,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
// and divisons, we instead render the map onto a backplane of characters
// (a character matrix), then draw the branches as a series of "L" shapes
// from the nodes. This is not only friendlier on CPU it uses less stack.
-void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, User* user)
+void ModuleSpanningTree::HandleMap(const char* const* parameters, int pcnt, User* user)
{
// This array represents a virtual screen which we will
// "scratch" draw to, as the console device of an irc
diff --git a/src/modules/m_spanningtree/override_modules.cpp b/src/modules/m_spanningtree/override_modules.cpp
index adecb7c34..c47d642f8 100644
--- a/src/modules/m_spanningtree/override_modules.cpp
+++ b/src/modules/m_spanningtree/override_modules.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleModules(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleModules(const char* const* parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_motd.cpp b/src/modules/m_spanningtree/override_motd.cpp
index f8398bea9..4aa94334a 100644
--- a/src/modules/m_spanningtree/override_motd.cpp
+++ b/src/modules/m_spanningtree/override_motd.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleMotd(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleMotd(const char* const* parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp
index 263b8cf2c..1a82e4bfb 100644
--- a/src/modules/m_spanningtree/override_squit.cpp
+++ b/src/modules/m_spanningtree/override_squit.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleSquit(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleSquit(const char* const* parameters, int pcnt, User* user)
{
TreeServer* s = Utils->FindServerMask(parameters[0]);
if (s)
diff --git a/src/modules/m_spanningtree/override_stats.cpp b/src/modules/m_spanningtree/override_stats.cpp
index 0ba18e42a..ba6650d6b 100644
--- a/src/modules/m_spanningtree/override_stats.cpp
+++ b/src/modules/m_spanningtree/override_stats.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleStats(const char* const* parameters, int pcnt, User* user)
{
if (pcnt > 1)
{
diff --git a/src/modules/m_spanningtree/override_time.cpp b/src/modules/m_spanningtree/override_time.cpp
index af2e4f576..cbd29f535 100644
--- a/src/modules/m_spanningtree/override_time.cpp
+++ b/src/modules/m_spanningtree/override_time.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleTime(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleTime(const char* const* parameters, int pcnt, User* user)
{
if ((IS_LOCAL(user)) && (pcnt))
{
diff --git a/src/modules/m_spanningtree/override_whois.cpp b/src/modules/m_spanningtree/override_whois.cpp
index 4721e8bcd..3cb282cb0 100644
--- a/src/modules/m_spanningtree/override_whois.cpp
+++ b/src/modules/m_spanningtree/override_whois.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleRemoteWhois(const char** parameters, int pcnt, User* user)
+int ModuleSpanningTree::HandleRemoteWhois(const char* const* parameters, int pcnt, User* user)
{
if ((IS_LOCAL(user)) && (pcnt > 1))
{
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index bd15113bc..de7142bea 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-void ModuleSpanningTree::OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
+void ModuleSpanningTree::OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
{
if ((result == CMD_SUCCESS) && (ServerInstance->IsValidModuleCommand(command, pcnt, user)))
{
diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp
index 00f2c598c..324aa3e14 100644
--- a/src/modules/m_spanningtree/precommand.cpp
+++ b/src/modules/m_spanningtree/precommand.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+int ModuleSpanningTree::OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_spanningtree/rconnect.cpp b/src/modules/m_spanningtree/rconnect.cpp
index 5cfb681d0..32308377a 100644
--- a/src/modules/m_spanningtree/rconnect.cpp
+++ b/src/modules/m_spanningtree/rconnect.cpp
@@ -36,7 +36,7 @@ cmd_rconnect::cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUt
syntax = "<remote-server-mask> <target-server-mask>";
}
-CmdResult cmd_rconnect::Handle (const char** parameters, int pcnt, User *user)
+CmdResult cmd_rconnect::Handle (const char* const* parameters, int pcnt, User *user)
{
if (IS_LOCAL(user))
{
diff --git a/src/modules/m_spanningtree/rconnect.h b/src/modules/m_spanningtree/rconnect.h
index 55f4d8655..94035dce2 100644
--- a/src/modules/m_spanningtree/rconnect.h
+++ b/src/modules/m_spanningtree/rconnect.h
@@ -22,7 +22,7 @@ class cmd_rconnect : public Command
SpanningTreeUtilities* Utils; /* Utility class */
public:
cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
- CmdResult Handle (const char** parameters, int pcnt, User *user);
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user);
};
#endif
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp
index 236702b72..a4158a20d 100644
--- a/src/modules/m_spanningtree/rsquit.cpp
+++ b/src/modules/m_spanningtree/rsquit.cpp
@@ -36,7 +36,7 @@ cmd_rsquit::cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilit
syntax = "<remote-server-mask> [target-server-mask]";
}
-CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, User *user)
+CmdResult cmd_rsquit::Handle (const char* const* parameters, int pcnt, User *user)
{
if (IS_LOCAL(user))
{
diff --git a/src/modules/m_spanningtree/rsquit.h b/src/modules/m_spanningtree/rsquit.h
index 095859dc7..5dce2f310 100644
--- a/src/modules/m_spanningtree/rsquit.h
+++ b/src/modules/m_spanningtree/rsquit.h
@@ -22,7 +22,7 @@ class cmd_rsquit : public Command
SpanningTreeUtilities* Utils; /* Utility class */
public:
cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
- CmdResult Handle (const char** parameters, int pcnt, User *user);
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user);
void NoticeUser(User* user, const std::string &msg);
};
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index 10e05ddf2..4701a717b 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -57,7 +57,7 @@ class CommandSvshold : public Command
TRANSLATE4(TR_NICK, 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: svshold nickname time :reason goes here */
/* 'time' is a human-readable timestring, like 2d3h2s. */
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 25a860ae4..ef5c5c35f 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -28,7 +28,7 @@ class CommandSwhois : 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]);
@@ -210,7 +210,7 @@ class ModuleSWhois : public Module
}
}
- virtual void OnPostCommand(const std::string &command, const char **params, int pcnt, User *user, CmdResult result, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const char* const* params, int pcnt, User *user, CmdResult result, const std::string &original_line)
{
if ((command != "OPER") || (result != CMD_SUCCESS))
return;
diff --git a/src/modules/m_taxonomy.cpp b/src/modules/m_taxonomy.cpp
index 1490d90ef..ec36c8a8e 100644
--- a/src/modules/m_taxonomy.cpp
+++ b/src/modules/m_taxonomy.cpp
@@ -29,7 +29,7 @@ class CommandTaxonomy : public Command
syntax = "<nickname>";
}
- 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]);
if (dest)
diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp
index 0cf5bbcd2..053dc781a 100644
--- a/src/modules/m_testcommand.cpp
+++ b/src/modules/m_testcommand.cpp
@@ -26,7 +26,7 @@ class CommandDalinfo : public Command
this->source = "m_testcommand.so";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick);
return CMD_FAILURE;
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 3e5823d1f..77660da7b 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -40,7 +40,7 @@ class CommandTban : 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)
{
Channel* channel = ServerInstance->FindChan(parameters[0]);
if (channel)
diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp
index a38deeb5f..20921bc56 100644
--- a/src/modules/m_tline.cpp
+++ b/src/modules/m_tline.cpp
@@ -27,7 +27,7 @@ class CommandTline : public Command
this->syntax = "<mask>";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
float n_counted = 0;
float n_matched = 0;
diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp
index 2a86a0c4b..dddf45591 100644
--- a/src/modules/m_uhnames.cpp
+++ b/src/modules/m_uhnames.cpp
@@ -56,7 +56,7 @@ class ModuleUHNames : public Module
ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, &namesx);
}
- 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 c = command.c_str();
/* We don't actually create a proper command handler class for PROTOCTL,
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 207fddf32..3499d5051 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -27,7 +27,7 @@ class CommandUninvite : 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* u = ServerInstance->FindNick(parameters[0]);
Channel* c = ServerInstance->FindChan(parameters[1]);
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index 9102fbc93..bca1d1acf 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -26,7 +26,7 @@ class CommandUserip : public Command
syntax = "<nick>{,<nick>}";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
std::string retbuf = std::string("340 ") + user->nick + " :";
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp
index 371f99dfa..598109966 100644
--- a/src/modules/m_vhost.cpp
+++ b/src/modules/m_vhost.cpp
@@ -26,7 +26,7 @@ class CommandVhost : public Command
syntax = "<username> <password>";
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
ConfigReader *Conf = new ConfigReader(ServerInstance);
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index eb1be40dc..b8539180a 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -84,7 +84,7 @@ class CommandSVSWatch : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
if (!ServerInstance->ULine(user->server))
return CMD_FAILURE;
@@ -231,7 +231,7 @@ class CommandWatch : public Command
TRANSLATE2(TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
if (!pcnt)
{