diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-25 21:58:20 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-25 21:58:20 -0400 |
commit | ae38212c1ce829c783edf971081c90137abb49a0 (patch) | |
tree | 5c652d9cdc38103dec6fa112d57fca882b4e3e44 /modules/core/bs_assign.cpp | |
parent | 15d7f0f6fe8bb903275f603f734c13f65f3aa906 (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/bs_assign.cpp')
-rw-r--r-- | modules/core/bs_assign.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp index 0695a7e6d..22f5f4487 100644 --- a/modules/core/bs_assign.cpp +++ b/modules/core/bs_assign.cpp @@ -20,10 +20,10 @@ class CommandBSAssign : public Command { } - CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms) + CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) { - const char *chan = params[0].c_str(); - const char *nick = params[1].c_str(); + Anope::string chan = params[0]; + Anope::string nick = params[1]; BotInfo *bi; ChannelInfo *ci; @@ -35,7 +35,7 @@ class CommandBSAssign : public Command if (!(bi = findbot(nick))) { - notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick); + notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str()); return MOD_CONT; } @@ -53,9 +53,9 @@ class CommandBSAssign : public Command return MOD_CONT; } - if (ci->bi && ci::string(ci->bi->nick.c_str()) == nick) + if (ci->bi && nick.equals_ci(ci->bi->nick)) { - notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan); + notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str()); return MOD_CONT; } @@ -64,13 +64,13 @@ class CommandBSAssign : public Command return MOD_CONT; } - bool OnHelp(User *u, const ci::string &subcommand) + bool OnHelp(User *u, const Anope::string &subcommand) { notice_help(Config.s_BotServ, u, BOT_HELP_ASSIGN); return true; } - void OnSyntaxError(User *u, const ci::string &subcommand) + void OnSyntaxError(User *u, const Anope::string &subcommand) { syntax_error(Config.s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX); } @@ -84,10 +84,11 @@ class CommandBSAssign : public Command class BSAssign : public Module { public: - BSAssign(const std::string &modname, const std::string &creator) : Module(modname, creator) + BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator) { this->SetAuthor("Anope"); this->SetType(CORE); + this->AddCommand(BotServ, new CommandBSAssign); } }; |