diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-12 03:53:12 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-12 03:53:12 +0000 |
commit | baaed4b764825abf00f555ddec6c1b12ac457789 (patch) | |
tree | 47a214ad0f97ec8305b79a7c998627b461ef05d8 /src/core/bs_bot.c | |
parent | 2e5b5731927c85b38263393276addda632f92420 (diff) |
Fix bs_bot to use the correct parameters, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2022 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/bs_bot.c')
-rw-r--r-- | src/core/bs_bot.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index adff0bedb..e2836830c 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -22,10 +22,10 @@ class CommandBSBot : public Command private: CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms) { - const char *nick = params[0].c_str(); - const char *user = params[1].c_str(); - const char *host = params[2].c_str(); - const char *real = params[3].c_str(); + const char *nick = params[1].c_str(); + const char *user = params[2].c_str(); + const char *host = params[3].c_str(); + const char *real = params[4].c_str(); const char *ch = NULL; BotInfo *bi; @@ -138,11 +138,11 @@ class CommandBSBot : public Command CommandReturn DoChange(User *u, std::vector<std::string> ¶ms) { - const char *oldnick = params[0].c_str(); - const char *nick = params[1].c_str(); - const char *user = params[2].c_str(); - const char *host = params[3].c_str(); - const char *real = params[4].c_str(); + const char *oldnick = params[1].c_str(); + const char *nick = params[2].c_str(); + const char *user = params[3].c_str(); + const char *host = params[4].c_str(); + const char *real = params[5].c_str(); const char *ch = NULL; BotInfo *bi; @@ -158,6 +158,12 @@ class CommandBSBot : public Command return MOD_CONT; } + if (nickIsServices(oldnick, 0)) + { + notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick); + return MOD_CONT; + } + if (strlen(nick) > NickLen) { notice_lang(s_BotServ, u, BOT_BAD_NICK); @@ -311,7 +317,7 @@ class CommandBSBot : public Command CommandReturn DoDel(User *u, std::vector<std::string> ¶ms) { - const char *nick = params[0].c_str(); + const char *nick = params[1].c_str(); BotInfo *bi; if (!nick) @@ -328,7 +334,7 @@ class CommandBSBot : public Command if (nickIsServices(nick, 0)) { - notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST); + notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST, nick); return MOD_CONT; } |