diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2011-03-26 08:20:05 +0100 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2011-03-26 08:20:05 +0100 |
commit | 365769d14cb953657fe81167674a4d2d155e4a7e (patch) | |
tree | d8221f2e8a3f3a7db2e0397b416bf9b9aea8252c /src | |
parent | 01b901eba19ba5cf5e4220634f705a13c81acce8 (diff) |
replaced all %R with %s in the language strings
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 2 | ||||
-rw-r--r-- | src/config.cpp | 6 | ||||
-rw-r--r-- | src/memoserv.cpp | 6 | ||||
-rw-r--r-- | src/users.cpp | 9 |
4 files changed, 12 insertions, 11 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 91b4787fd..01f8eb45b 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -57,7 +57,7 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope: if (!c) { - u->SendMessage(bi, _("Unknown command \002%s\002. \"%R%s HELP\" for help."), command.c_str(), bi->nick.c_str()); + u->SendMessage(bi, _("Unknown command \002%s\002. \"%s%s HELP\" for help."), command.c_str(), Config->UseStrictPrivMsgString.c_str(), bi->nick.c_str()); PopLanguage(); return; } diff --git a/src/config.cpp b/src/config.cpp index e230a15b7..f75913fc9 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -147,6 +147,12 @@ ServerConfig::ServerConfig() : config_data(), NSDefFlags(NickCoreFlagStrings), C } } + if (UseStrictPrivMsg) + UseStrictPrivMsgString = "/"; + else + UseStrictPrivMsgString ="/msg "; + + if (!BSDefaults.empty()) { spacesepstream options(BSDefaults); diff --git a/src/memoserv.cpp b/src/memoserv.cpp index 9869e4264..a92742864 100644 --- a/src/memoserv.cpp +++ b/src/memoserv.cpp @@ -59,7 +59,7 @@ void check_memos(User *u) { u->SendMessage(MemoServ, newcnt == 1 ? _("You have 1 new memo.") : _("You have %d new memos."), newcnt); if (newcnt == 1 && (nc->memos.memos[i - 1]->HasFlag(MF_UNREAD))) - u->SendMessage(MemoServ, _("Type \002%R%s READ LAST\002 to read it."), Config->s_MemoServ.c_str()); + u->SendMessage(MemoServ, _("Type \002%s%s READ LAST\002 to read it."), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str()); else if (newcnt == 1) { for (i = 0; i < end; ++i) @@ -67,10 +67,10 @@ void check_memos(User *u) if (nc->memos.memos[i]->HasFlag(MF_UNREAD)) break; } - u->SendMessage(MemoServ, _("Type \002%R%s READ %d\002 to read it."), Config->s_MemoServ.c_str(), i); + u->SendMessage(MemoServ, _("Type \002%s%s READ %d\002 to read it."), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), i); } else - u->SendMessage(MemoServ, _("Type \002%R%s LIST NEW\002 to list them."), Config->s_MemoServ.c_str()); + u->SendMessage(MemoServ, _("Type \002%s%s LIST NEW\002 to list them."), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str()); } if (nc->memos.memomax > 0 && nc->memos.memos.size() >= nc->memos.memomax) { diff --git a/src/users.cpp b/src/users.cpp index 01380f480..4d9246a14 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -236,11 +236,6 @@ void User::SendMessage(BotInfo *source, const char *fmt, ...) void User::SendMessage(BotInfo *source, Anope::string msg) { - if (Config->UseStrictPrivMsg) - msg = msg.replace_all_cs("%R", "/"); - else - msg = msg.replace_all_cs("%R", "/msg "); - /* Send privmsg instead of notice if: * - UsePrivmsg is enabled * - The user is not registered and NSDefMsg is enabled @@ -373,9 +368,9 @@ void User::Identify(NickAlias *na) this->SendMessage(NickServ, _("You must now supply an e-mail for your nick.\n" "This e-mail will allow you to retrieve your password in\n" "case you forget it.")); - this->SendMessage(NickServ, _("Type \002%R%s SET EMAIL \037e-mail\037\002 in order to set your e-mail.\n" + this->SendMessage(NickServ, _("Type \002%s%s SET EMAIL \037e-mail\037\002 in order to set your e-mail.\n" "Your privacy is respected; this e-mail won't be given to\n" - "any third-party person."), NickServ->nick.c_str()); + "any third-party person."), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str()); } if (na->nc->HasFlag(NI_UNCONFIRMED)) |