summaryrefslogtreecommitdiff
path: root/modules/core/cs_status.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-07-25 21:58:20 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-07-25 21:58:20 -0400
commitae38212c1ce829c783edf971081c90137abb49a0 (patch)
tree5c652d9cdc38103dec6fa112d57fca882b4e3e44 /modules/core/cs_status.cpp
parent15d7f0f6fe8bb903275f603f734c13f65f3aa906 (diff)
Epic commit to replace most of the strings in Anope with a single Anope::string class, plus some other little fixes here and there. If you follow 1.9.x development and are testing things, THIS is one of those things that NEEDS testing.
Diffstat (limited to 'modules/core/cs_status.cpp')
-rw-r--r--modules/core/cs_status.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/core/cs_status.cpp b/modules/core/cs_status.cpp
index 31dab055c..01c95796d 100644
--- a/modules/core/cs_status.cpp
+++ b/modules/core/cs_status.cpp
@@ -20,13 +20,13 @@ class CommandCSStatus : public Command
{
}
- CommandReturn Execute(User *u, const std::vector<ci::string> &params)
+ CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
ChannelInfo *ci;
User *u2;
- const char *chan = params[0].c_str();
- const char *nick = params[1].c_str();
- const char *temp = NULL;
+ Anope::string chan = params[0];
+ Anope::string nick = params[1];
+ Anope::string temp;
if (!(ci = cs_findchan(chan)))
{
@@ -36,21 +36,21 @@ class CommandCSStatus : public Command
ci = cs_findchan(chan);
}
if (!ci)
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOT_REGGED, temp);
+ notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOT_REGGED, temp.c_str());
else if ((u2 = finduser(nick)))
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_INFO, chan, nick, get_access(u2, ci));
+ notice_lang(Config.s_ChanServ, u, CHAN_STATUS_INFO, chan.c_str(), nick.c_str(), get_access(u2, ci));
else /* !u2 */
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOTONLINE, nick);
+ notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOTONLINE, nick.c_str());
return MOD_CONT;
}
- bool OnHelp(User *u, const ci::string &subcommand)
+ bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_STATUS);
return true;
}
- void OnSyntaxError(User *u, const ci::string &subcommand)
+ void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config.s_ChanServ, u, "STATUS", CHAN_STATUS_SYNTAX);
}
@@ -64,10 +64,12 @@ class CommandCSStatus : public Command
class CSStatus : public Module
{
public:
- CSStatus(const std::string &modname, const std::string &creator) : Module(modname, creator)
+ CSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
+
+ this->AddCommand(ChanServ, new CommandCSStatus());
}
};