1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 23:43:13 +02:00

Fix *_help, so they work and, uh, don't crash.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2010 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-02-11 00:57:47 +00:00
parent 56633e894d
commit b0e41b4811
7 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -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;
}
+1 -2
View File
@@ -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)
{
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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;
}