summaryrefslogtreecommitdiff
path: root/modules/core/cs_getkey.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_getkey.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_getkey.cpp')
-rw-r--r--modules/core/cs_getkey.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/core/cs_getkey.cpp b/modules/core/cs_getkey.cpp
index dc2f74655..80fa564e8 100644
--- a/modules/core/cs_getkey.cpp
+++ b/modules/core/cs_getkey.cpp
@@ -20,11 +20,11 @@ class CommandCSGetKey : public Command
{
}
- CommandReturn Execute(User *u, const std::vector<ci::string> &params)
+ CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
- const char *chan = params[0].c_str();
+ Anope::string chan = params[0];
ChannelInfo *ci;
- std::string key;
+ Anope::string key;
ci = cs_findchan(chan);
@@ -36,21 +36,21 @@ class CommandCSGetKey : public Command
if (!ci->c || !ci->c->GetParam(CMODE_KEY, key))
{
- notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_NOKEY, chan);
+ notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_NOKEY, chan.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_KEY, chan, key.c_str());
+ notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_KEY, chan.c_str(), key.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_HELP_GETKEY);
return true;
}
- void OnSyntaxError(User *u, const ci::string &subcommand)
+ void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config.s_ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
}
@@ -64,10 +64,11 @@ class CommandCSGetKey : public Command
class CSGetKey : public Module
{
public:
- CSGetKey(const std::string &modname, const std::string &creator) : Module(modname, creator)
+ CSGetKey(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
+
this->AddCommand(ChanServ, new CommandCSGetKey());
}
};