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/cs_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/core/cs_info.c')
-rw-r--r-- | src/core/cs_info.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/cs_info.c b/src/core/cs_info.c index f33e74c79..9a7cc9bcc 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -37,10 +37,10 @@ class CommandCSInfo : public Command this->SetFlag(CFLAG_ALLOW_FORBIDDEN); } - CommandReturn Execute(User *u, std::vector<std::string> ¶ms) + CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) { const char *chan = params[0].c_str(); - const char *param = params.size() > 1 ? params[1].c_str() : NULL; + ci::string param = params.size() > 1 ? params[1] : ""; ChannelInfo *ci; char buf[BUFSIZE]; struct tm *tm; @@ -63,9 +63,8 @@ class CommandCSInfo : public Command return MOD_CONT; } - /* Should we show all fields? Only for sadmins and identified users */ - if (param && stricmp(param, "ALL") == 0 && (check_access(u, ci, CA_INFO) || has_auspex)) + if (!param.empty() && param == "ALL" && (check_access(u, ci, CA_INFO) || has_auspex)) show_all = 1; notice_lang(s_ChanServ, u, CHAN_INFO_HEADER, chan); @@ -158,8 +157,6 @@ class CommandCSInfo : public Command } }; - - class CSInfo : public Module { public: @@ -176,7 +173,4 @@ class CSInfo : public Module } }; - - - MODULE_INIT("cs_info", CSInfo) |