summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/bs_help.c2
-rw-r--r--src/core/cs_help.c3
-rw-r--r--src/core/he_help.c2
-rw-r--r--src/core/hs_help.c2
-rw-r--r--src/core/ms_help.c2
-rw-r--r--src/core/ns_help.c4
-rw-r--r--src/core/os_help.c2
7 files changed, 8 insertions, 9 deletions
diff --git a/src/core/bs_help.c b/src/core/bs_help.c
index 480dd62f7..3506d3acd 100644
--- a/src/core/bs_help.c
+++ b/src/core/bs_help.c
@@ -24,7 +24,7 @@ class CommandBSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- mod_help_cmd(s_BotServ, u, BOTSERV, params[0].c_str());
+ mod_help_cmd(s_BotServ, u, BOTSERV, params.size() > 0 ? params[0].c_str() : NULL);
return MOD_CONT;
}
diff --git a/src/core/cs_help.c b/src/core/cs_help.c
index b27c6a7c2..4d71be428 100644
--- a/src/core/cs_help.c
+++ b/src/core/cs_help.c
@@ -25,8 +25,7 @@ class CommandCSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- const char *cmd = params[0].c_str();
- const char *subcmd = params[1].c_str();
+ const char *cmd = params.size() > 0 ? params[0].c_str() : NULL;
if (!cmd)
{
diff --git a/src/core/he_help.c b/src/core/he_help.c
index c4411e711..7227669cf 100644
--- a/src/core/he_help.c
+++ b/src/core/he_help.c
@@ -24,7 +24,7 @@ class CommandHEHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- mod_help_cmd(s_HelpServ, u, HELPSERV, params[0].c_str());
+ mod_help_cmd(s_HelpServ, u, HELPSERV, params.size() > 0 ? params[0].c_str() : NULL);
return MOD_CONT;
}
diff --git a/src/core/hs_help.c b/src/core/hs_help.c
index e1278400a..8e542602b 100644
--- a/src/core/hs_help.c
+++ b/src/core/hs_help.c
@@ -24,7 +24,7 @@ class CommandHSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- mod_help_cmd(s_HostServ, u, HOSTSERV, params[0].c_str());
+ mod_help_cmd(s_HostServ, u, HOSTSERV, params.size() > 0 ? params[0].c_str() : NULL);
return MOD_CONT;
}
diff --git a/src/core/ms_help.c b/src/core/ms_help.c
index d76c7515e..687944961 100644
--- a/src/core/ms_help.c
+++ b/src/core/ms_help.c
@@ -24,7 +24,7 @@ class CommandMSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- mod_help_cmd(s_MemoServ, u, MEMOSERV, params[0].c_str());
+ mod_help_cmd(s_MemoServ, u, MEMOSERV, params.size() > 0 ? params[0].c_str() : NULL);
return MOD_CONT;
}
diff --git a/src/core/ns_help.c b/src/core/ns_help.c
index 552fc5091..5ba3d4d79 100644
--- a/src/core/ns_help.c
+++ b/src/core/ns_help.c
@@ -24,8 +24,8 @@ class CommandNSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- const char *cmd = params[0].c_str();
- if (!stricmp(cmd, "SET LANGUAGE"))
+ const char *cmd = params.size() > 0 ? params[0].c_str() : NULL;
+ if (cmd && !stricmp(cmd, "SET LANGUAGE"))
{
int i;
notice_help(s_NickServ, u, NICK_HELP_SET_LANGUAGE);
diff --git a/src/core/os_help.c b/src/core/os_help.c
index d7ddb666e..94b241f4a 100644
--- a/src/core/os_help.c
+++ b/src/core/os_help.c
@@ -24,7 +24,7 @@ class CommandOSHelp : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
- mod_help_cmd(s_OperServ, u, OPERSERV, params[0].c_str());
+ mod_help_cmd(s_OperServ, u, OPERSERV, params.size() > 0 ? params[0].c_str() : NULL);
return MOD_CONT;
}