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/modules/hs_request.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/modules/hs_request.c')
-rw-r--r-- | src/modules/hs_request.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index dbd6b67eb..e249561ef 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -74,7 +74,7 @@ class CommandHSRequest : public Command { } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { char *nick; const char *rawhostmask = params[0].c_str(); @@ -206,7 +206,7 @@ class CommandHSActivate : public Command { } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { if (!u->nc->HasPriv("hostserv/set")) { @@ -271,7 +271,7 @@ class CommandHSReject : public Command { } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { if (!u->nc->HasPriv("hostserv/set")) { @@ -330,7 +330,7 @@ class CommandHSReject : public Command class HSListBase : public Command { protected: - CommandReturn DoList(User *u, std::vector<std::string> ¶ms) + CommandReturn DoList(User *u) { if (!u->nc->HasPriv("hostserv/set")) { @@ -383,9 +383,9 @@ class CommandHSWaiting : public HSListBase { } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { - return this->DoList(u, params); + return this->DoList(u); } bool OnHelp(User *u, const ci::string &subcommand) @@ -691,17 +691,17 @@ class HSRequest : public Module delete [] HSRequestDBName; } - EventReturn OnPreCommand(User *u, const std::string &service, const std::string &command, const std::vector<std::string> ¶ms) + EventReturn OnPreCommand(User *u, const std::string &service, const ci::string &command, const std::vector<ci::string> ¶ms) { if (service == s_HostServ) { if (command == "LIST") { - const char *key = params.size() ? params[0].c_str() : NULL; + ci::string key = params.size() ? params[0] : ""; - if (key && !stricmp(key, "+req")) + if (!key.empty() && key == "+req") { - std::vector<std::string> emptyParams; + std::vector<ci::string> emptyParams; Command *c = findCommand(HOSTSERV, "WAITING"); c->Execute(u, emptyParams); return EVENT_STOP; |