diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-25 00:37:43 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-25 00:37:43 +0000 |
commit | b2a57b09742da6c2f2011ad41eb470139d88e14f (patch) | |
tree | 054e41a724108706c5ea5f659d2065fe5fae2504 /src/core/bs_bot.c | |
parent | 443654f15bf036bb18f9847332e2bd03ec823b3d (diff) |
Changed params parameter of Command's Execute() from std::vector<std::string> to std::vector<ci::string>, seems to have no ill effects but may require some testing to be sure.
Also a few minor cleanups here and there.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2392 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/bs_bot.c')
-rw-r--r-- | src/core/bs_bot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 787f5b131..fa2d7fab4 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -18,7 +18,7 @@ class CommandBSBot : public Command { private: - CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms) + CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms) { const char *nick = params[1].c_str(); const char *user = params.size() > 2 ? params[2].c_str() : NULL; @@ -135,7 +135,7 @@ class CommandBSBot : public Command return MOD_CONT; } - CommandReturn DoChange(User *u, std::vector<std::string> ¶ms) + CommandReturn DoChange(User *u, std::vector<ci::string> ¶ms) { const char *oldnick = params[1].c_str(); const char *nick = params.size() > 2 ? params[2].c_str() : NULL; @@ -315,7 +315,7 @@ class CommandBSBot : public Command return MOD_CONT; } - CommandReturn DoDel(User *u, std::vector<std::string> ¶ms) + CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms) { const char *nick = params[1].c_str(); BotInfo *bi; @@ -353,9 +353,9 @@ class CommandBSBot : public Command this->SetFlag(CFLAG_STRIP_CHANNEL); } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { - const char *cmd = params[0].c_str(); + ci::string cmd = params[0]; if (readonly) { @@ -363,7 +363,7 @@ class CommandBSBot : public Command return MOD_CONT; } - if (!stricmp(cmd, "ADD")) + if (cmd == "ADD") { // ADD nick user host real - 5 if (!u->nc->HasCommand("botserv/bot/add")) @@ -384,7 +384,7 @@ class CommandBSBot : public Command return this->DoAdd(u, params); } - else if (!stricmp(cmd, "CHANGE")) + else if (cmd == "CHANGE") { // CHANGE oldn newn user host real - 6 // but only oldn and newn are required @@ -402,7 +402,7 @@ class CommandBSBot : public Command return this->DoChange(u, params); } - else if (!stricmp(cmd, "DEL")) + else if (cmd == "DEL") { // DEL nick if (!u->nc->HasCommand("botserv/bot/del")) |