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/os_info.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/os_info.c')
| -rw-r--r-- | src/modules/os_info.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/os_info.c b/src/modules/os_info.c index fcd20d9bb..04ace5f12 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -52,7 +52,7 @@ static Module *me; class CommandNSOInfo : 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 *info = params.size() > 2 ? params[2].c_str() : NULL; @@ -83,7 +83,7 @@ class CommandNSOInfo : 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(); NickAlias *na = NULL; @@ -110,13 +110,13 @@ class CommandNSOInfo : 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]; - if (!strcasecmp(cmd, "ADD")) + if (cmd == "ADD") return this->DoAdd(u, params); - else if (!strcasecmp(cmd, "DEL")) + else if (cmd == "DEL") return this->DoDel(u, params); else this->OnSyntaxError(u); @@ -141,7 +141,7 @@ class CommandNSOInfo : public Command class CommandCSOInfo : public Command { private: - CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms) + CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms) { const char *chan = params[0].c_str(); const char *info = params.size() > 2 ? params[2].c_str() : NULL; @@ -166,7 +166,7 @@ class CommandCSOInfo : 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 *chan = params[0].c_str(); ChannelInfo *ci = cs_findchan(chan); @@ -187,13 +187,13 @@ class CommandCSOInfo : public Command { } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { - const char *cmd = params[1].c_str(); + ci::string cmd = params[1]; - if (!strcasecmp(cmd, "ADD")) + if (cmd == "ADD") return this->DoAdd(u, params); - else if (!strcasecmp(cmd, "DEL")) + else if (cmd == "DEL") return this->DoDel(u, params); else this->OnSyntaxError(u); @@ -502,7 +502,7 @@ class OSInfo : public Module alog("os_info.c: ERROR: An error has occured while reloading the configuration file"); } - void OnPostCommand(User *u, const std::string &service, const std::string &command, const std::vector<std::string> ¶ms) + void OnPostCommand(User *u, const std::string &service, const ci::string &command, const std::vector<ci::string> ¶ms) { if (command == "INFO") { |
