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/ns_access.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/ns_access.c')
-rw-r--r-- | src/core/ns_access.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/ns_access.c b/src/core/ns_access.c index c03b982fc..82e05ad34 100644 --- a/src/core/ns_access.c +++ b/src/core/ns_access.c @@ -18,7 +18,7 @@ class CommandNSAccess : public Command { private: - CommandReturn DoServAdminList(User *u, std::vector<std::string> ¶ms, NickCore *nc) + CommandReturn DoServAdminList(User *u, std::vector<ci::string> ¶ms, NickCore *nc) { const char *mask = params.size() > 2 ? params[2].c_str() : NULL; unsigned i; @@ -55,7 +55,7 @@ class CommandNSAccess : public Command return MOD_CONT; } - CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms, NickCore *nc, const char *mask) + CommandReturn DoAdd(User *u, NickCore *nc, const char *mask) { if (!mask) { @@ -81,7 +81,7 @@ class CommandNSAccess : public Command return MOD_CONT; } - CommandReturn DoDel(User *u, std::vector<std::string> ¶ms, NickCore *nc, const char *mask) + CommandReturn DoDel(User *u, NickCore *nc, const char *mask) { if (!mask) { @@ -101,7 +101,7 @@ class CommandNSAccess : public Command return MOD_CONT; } - CommandReturn DoList(User *u, std::vector<std::string> ¶ms, NickCore *nc, const char *mask) + CommandReturn DoList(User *u, NickCore *nc, const char *mask) { unsigned i; @@ -127,13 +127,13 @@ class CommandNSAccess : public Command { } - 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]; const char *mask = params.size() > 1 ? params[1].c_str() : NULL; NickAlias *na; - if (!stricmp(cmd, "LIST") && u->nc->IsServicesOper() && mask && (na = findnick(params[1].c_str()))) + if (cmd == "LIST" && u->nc->IsServicesOper() && mask && (na = findnick(params[1].c_str()))) return this->DoServAdminList(u, params, na->nc); if (mask && !strchr(mask, '@')) @@ -148,12 +148,12 @@ class CommandNSAccess : public Command */ else if (u->nc->flags & NI_SUSPENDED) notice_lang(s_NickServ, u, NICK_X_SUSPENDED, u->nc->display); - else if (!stricmp(cmd, "ADD")) - return this->DoAdd(u, params, u->nc, mask); - else if (!stricmp(cmd, "DEL")) - return this->DoDel(u, params, u->nc, mask); - else if (!stricmp(cmd, "LIST")) - return this->DoList(u, params, u->nc, mask); + else if (cmd == "ADD") + return this->DoAdd(u, u->nc, mask); + else if (cmd == "DEL") + return this->DoDel(u, u->nc, mask); + else if (cmd == "LIST") + return this->DoList(u, u->nc, mask); else this->OnSyntaxError(u); return MOD_CONT; |