summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/bs_kick.cpp4
-rw-r--r--modules/core/bs_main.cpp12
-rw-r--r--modules/core/cs_access.cpp2
-rw-r--r--modules/core/cs_main.cpp15
-rw-r--r--modules/core/cs_suspend.cpp2
-rw-r--r--modules/core/ms_main.cpp10
-rw-r--r--modules/core/ms_read.cpp2
-rw-r--r--modules/core/ns_help.cpp2
-rw-r--r--modules/core/ns_main.cpp10
-rw-r--r--modules/core/ns_recover.cpp4
-rw-r--r--modules/core/ns_resetpass.cpp6
-rw-r--r--modules/core/ns_sendpass.cpp6
-rw-r--r--modules/core/ns_set_language.cpp6
-rw-r--r--modules/core/os_main.cpp4
-rw-r--r--modules/extra/cs_appendtopic.cpp6
-rw-r--r--modules/extra/cs_enforce.cpp28
-rw-r--r--modules/extra/cs_tban.cpp8
-rw-r--r--modules/extra/hs_request.cpp48
-rw-r--r--modules/extra/language/cs_appendtopic.de_DE.po8
-rw-r--r--modules/extra/language/cs_appendtopic.it_IT.po7
-rw-r--r--modules/extra/language/cs_appendtopic.nl_NL.po7
-rw-r--r--modules/extra/language/cs_appendtopic.pot6
-rw-r--r--modules/extra/language/cs_appendtopic.pt_PT.po7
-rw-r--r--modules/extra/language/cs_appendtopic.ru_RU.po7
-rw-r--r--modules/extra/language/cs_enforce.de_DE.po19
-rw-r--r--modules/extra/language/cs_enforce.it_IT.po19
-rw-r--r--modules/extra/language/cs_enforce.nl_NL.po19
-rw-r--r--modules/extra/language/cs_enforce.pot18
-rw-r--r--modules/extra/language/cs_enforce.pt_PT.po19
-rw-r--r--modules/extra/language/cs_enforce.ru_RU.po19
-rw-r--r--modules/extra/language/cs_entrymsg.pot30
-rw-r--r--modules/extra/language/cs_tban.de_DE.po17
-rw-r--r--modules/extra/language/cs_tban.it_IT.po17
-rw-r--r--modules/extra/language/cs_tban.nl_NL.po17
-rw-r--r--modules/extra/language/cs_tban.pot16
-rw-r--r--modules/extra/language/cs_tban.pt_PT.po17
-rw-r--r--modules/extra/language/cs_tban.ru_RU.po17
-rw-r--r--modules/extra/language/hs_request.it_IT.po90
-rw-r--r--modules/extra/language/hs_request.nl_NL.po90
-rw-r--r--modules/extra/language/hs_request.pot73
-rw-r--r--modules/extra/language/hs_request.pt_PT.po90
-rw-r--r--modules/extra/language/hs_request.ru_RU.po90
-rw-r--r--modules/extra/language/m_ldap_authentication.pot27
-rw-r--r--modules/extra/language/ns_maxemail.pot2
-rw-r--r--modules/extra/language/os_defcon.pot100
-rwxr-xr-xmodules/extra/language/update.sh2
-rw-r--r--modules/extra/m_async_commands.cpp5
-rw-r--r--modules/extra/ns_maxemail.cpp4
-rw-r--r--modules/extra/os_defcon.cpp4
49 files changed, 608 insertions, 430 deletions
diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp
index 66232f10c..3e6719338 100644
--- a/modules/core/bs_kick.cpp
+++ b/modules/core/bs_kick.cpp
@@ -616,10 +616,8 @@ class BSKick : public Module
if (!ci || !ci->bi || !ci->c || !u || u->server->IsULined())
return;
- Anope::string fmt = GetString(u->Account(), message);
+ Anope::string fmt = translate(u, message);
va_start(args, message);
- if (fmt.empty())
- return;
vsnprintf(buf, sizeof(buf), fmt.c_str(), args);
va_end(args);
diff --git a/modules/core/bs_main.cpp b/modules/core/bs_main.cpp
index 442d522db..e325b012f 100644
--- a/modules/core/bs_main.cpp
+++ b/modules/core/bs_main.cpp
@@ -24,8 +24,6 @@ class BotServBotInfo : public BotInfo
void OnMessage(User *u, const Anope::string &message)
{
- PushLanguage("anope", u->Account() ? u->Account()->language : "");
-
spacesepstream sep(message);
Anope::string command, param;
if (sep.GetToken(command) && sep.GetToken(param))
@@ -40,30 +38,26 @@ class BotServBotInfo : public BotInfo
{
if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED))
{
- u->SendMessage(this, _(_(CHAN_X_SUSPENDED)), ci->name.c_str());
+ u->SendMessage(this, CHAN_X_SUSPENDED, ci->name.c_str());
Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name;
- PopLanguage();
return;
}
}
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL))
{
- u->SendMessage(this, _(_(CHAN_X_NOT_REGISTERED)), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_NOT_REGISTERED, param.c_str());
return;
}
}
/* A user not giving a channel name for a param that should be a channel */
else
{
- u->SendMessage(this, _(CHAN_X_INVALID), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_INVALID, param.c_str());
return;
}
}
}
- PopLanguage();
BotInfo::OnMessage(u, message);
}
};
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp
index 23d8c4e16..7d39b2ce5 100644
--- a/modules/core/cs_access.cpp
+++ b/modules/core/cs_access.cpp
@@ -716,7 +716,7 @@ class CommandCSLevels : public Command
levelinfo_maxwidth = len;
}
for (i = 0; levelinfo[i].what >= 0; ++i)
- source.Reply(_(" %-*s %s"), levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(source.u->Account(), levelinfo[i].desc).c_str());
+ source.Reply(_(" %-*s %s"), levelinfo_maxwidth, levelinfo[i].name.c_str(), translate(source.u, levelinfo[i].desc));
}
else
source.Reply(_("Syntax: \002LEVELS \037channel\037 SET \037type\037 \037level\037\002\n"
diff --git a/modules/core/cs_main.cpp b/modules/core/cs_main.cpp
index 9d1664afb..49d1c800b 100644
--- a/modules/core/cs_main.cpp
+++ b/modules/core/cs_main.cpp
@@ -23,12 +23,9 @@ class ChanServBotInfo : public BotInfo
void OnMessage(User *u, const Anope::string &message)
{
- PushLanguage("anope", u->Account() ? u->Account()->language : "");
-
if (!u->HasMode(UMODE_OPER) && Config->CSOpersOnly)
{
- u->SendMessage(ChanServ, _(ACCESS_DENIED));
- PopLanguage();
+ u->SendMessage(ChanServ, ACCESS_DENIED);
return;
}
@@ -46,30 +43,26 @@ class ChanServBotInfo : public BotInfo
{
if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED))
{
- u->SendMessage(this, _(_(CHAN_X_SUSPENDED)), ci->name.c_str());
+ u->SendMessage(this, CHAN_X_SUSPENDED, ci->name.c_str());
Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name;
- PopLanguage();
return;
}
}
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL))
{
- u->SendMessage(this, _(CHAN_X_NOT_REGISTERED), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_NOT_REGISTERED, param.c_str());
return;
}
}
/* A user not giving a channel name for a param that should be a channel */
else
{
- u->SendMessage(this, _(CHAN_X_INVALID), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_INVALID, param.c_str());
return;
}
}
}
- PopLanguage();
BotInfo::OnMessage(u, message);
}
};
diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp
index 32d75bbeb..a027bc173 100644
--- a/modules/core/cs_suspend.cpp
+++ b/modules/core/cs_suspend.cpp
@@ -54,7 +54,7 @@ class CommandCSSuspend : public Command
if (uc->user->HasMode(UMODE_OPER))
continue;
- c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), gtl("This channel has been suspended.")).c_str());
+ c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : translate(uc->user, _("This channel has been suspended.")));
}
}
diff --git a/modules/core/ms_main.cpp b/modules/core/ms_main.cpp
index c2933254c..487059413 100644
--- a/modules/core/ms_main.cpp
+++ b/modules/core/ms_main.cpp
@@ -17,16 +17,16 @@
static BotInfo *MemoServ = NULL;
static bool SendMemoMail(NickCore *nc, MemoInfo *mi, Memo *m)
{
- Anope::string message = Anope::printf(GetString(nc, gtl(
+ Anope::string message = Anope::printf(translate(nc, _(
"Hi %s\n"
" \n"
"You've just received a new memo from %s. This is memo number %d.\n"
" \n"
"Memo text:\n"
" \n"
- "%s")).c_str(), nc->display.c_str(), m->sender.c_str(), mi->GetIndex(m), m->text.c_str());
+ "%s")), nc->display.c_str(), m->sender.c_str(), mi->GetIndex(m), m->text.c_str());
- return Mail(nc, GetString(nc, gtl("New memo")), message);
+ return Mail(nc, translate(nc, _("New memo")), message);
}
class MyMemoServService : public MemoServService
@@ -105,7 +105,7 @@ class MyMemoServService : public MemoServService
if (check_access(cu->user, ci, CA_MEMO))
{
if (cu->user->Account() && cu->user->Account()->HasFlag(NI_MEMO_RECEIVE))
- cu->user->SendMessage(MemoServ, _(MEMO_NEW_X_MEMO_ARRIVED), ci->name.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), mi->memos.size());
+ cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), mi->memos.size());
}
}
}
@@ -121,7 +121,7 @@ class MyMemoServService : public MemoServService
NickAlias *na = *it;
User *user = finduser(na->nick);
if (user && user->IsIdentified())
- user->SendMessage(MemoServ, _(MEMO_NEW_MEMO_ARRIVED), source.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
+ user->SendMessage(MemoServ, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
}
}
diff --git a/modules/core/ms_read.cpp b/modules/core/ms_read.cpp
index 706906be4..a868b5c88 100644
--- a/modules/core/ms_read.cpp
+++ b/modules/core/ms_read.cpp
@@ -33,7 +33,7 @@ void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Anope::str
/* Text of the memo varies if the recepient was a
nick or channel */
- Anope::string text = Anope::printf(GetString(na->nc, gtl("\002[auto-memo]\002 The memo you sent to %s has been viewed.")).c_str(), targ.c_str());
+ Anope::string text = Anope::printf(translate(na->nc, _("\002[auto-memo]\002 The memo you sent to %s has been viewed.")), targ.c_str());
/* Send notification */
memoserv->Send(source.u->nick, m->sender, text, true);
diff --git a/modules/core/ns_help.cpp b/modules/core/ns_help.cpp
index 29a6bd1cd..77c1b6f69 100644
--- a/modules/core/ns_help.cpp
+++ b/modules/core/ns_help.cpp
@@ -37,7 +37,7 @@ class CommandNSHelp : public Command
"commands allow for registration and maintenance of\n"
"nicknames; to use them, type \002%s%s \037command\037\002.\n"
"For more information on a specific command, type\n"
- "\002%s%s HELP \037command\037\002."), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
+ "\002%s%s HELP \037command\037\002."), Config->s_NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
for (CommandMap::const_iterator it = nickserv->Bot()->Commands.begin(), it_end = nickserv->Bot()->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || u->HasCommand(it->second->permission))
it->second->OnServHelp(source);
diff --git a/modules/core/ns_main.cpp b/modules/core/ns_main.cpp
index 8d50f7042..f4797fa29 100644
--- a/modules/core/ns_main.cpp
+++ b/modules/core/ns_main.cpp
@@ -34,14 +34,14 @@ class MyNickServService : public NickServService
if (na->nc->HasFlag(NI_SUSPENDED))
{
- u->SendMessage(NickServ, _(NICK_X_SUSPENDED), u->nick.c_str());
+ u->SendMessage(NickServ, NICK_X_SUSPENDED, u->nick.c_str());
u->Collide(na);
return;
}
if (!u->IsIdentified() && !u->fingerprint.empty() && na->nc->FindCert(u->fingerprint))
{
- u->SendMessage(NickServ, _("SSL Fingerprint accepted, you are now identified"));
+ u->SendMessage(NickServ, _("SSL Fingerprint accepted, you are now identified."));
u->Identify(na);
return;
}
@@ -58,16 +58,16 @@ class MyNickServService : public NickServService
if (u->IsRecognized() || !na->nc->HasFlag(NI_KILL_IMMED))
{
if (na->nc->HasFlag(NI_SECURE))
- u->SendMessage(NickServ, _(NICK_IS_SECURE), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
+ u->SendMessage(NickServ, NICK_IS_SECURE, Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
else
- u->SendMessage(NickServ, _(NICK_IS_REGISTERED), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
+ u->SendMessage(NickServ, NICK_IS_REGISTERED, Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
}
if (na->nc->HasFlag(NI_KILLPROTECT) && !u->IsRecognized())
{
if (na->nc->HasFlag(NI_KILL_IMMED))
{
- u->SendMessage(NickServ, _(FORCENICKCHANGE_NOW));
+ u->SendMessage(NickServ, FORCENICKCHANGE_NOW);
u->Collide(na);
}
else if (na->nc->HasFlag(NI_KILL_QUICK))
diff --git a/modules/core/ns_recover.cpp b/modules/core/ns_recover.cpp
index bbac98e09..b6a8e1c5d 100644
--- a/modules/core/ns_recover.cpp
+++ b/modules/core/ns_recover.cpp
@@ -49,7 +49,7 @@ class CommandNSRecover : public Command
if (MOD_RESULT == EVENT_ALLOW)
{
- u2->SendMessage(nickserv->Bot(), _(FORCENICKCHANGE_NOW));
+ u2->SendMessage(nickserv->Bot(), FORCENICKCHANGE_NOW);
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
@@ -69,7 +69,7 @@ class CommandNSRecover : public Command
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)) ||
(!u->fingerprint.empty() && na->nc->FindCert(u->fingerprint)))
{
- u2->SendMessage(nickserv->Bot(), _(FORCENICKCHANGE_NOW));
+ u2->SendMessage(nickserv->Bot(), FORCENICKCHANGE_NOW);
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
diff --git a/modules/core/ns_resetpass.cpp b/modules/core/ns_resetpass.cpp
index 903e136fb..55b4ae18b 100644
--- a/modules/core/ns_resetpass.cpp
+++ b/modules/core/ns_resetpass.cpp
@@ -138,8 +138,8 @@ static bool SendResetEmail(User *u, NickAlias *na)
for (idx = 0; idx < 20; ++idx)
passcode += chars[1 + static_cast<int>((static_cast<float>(max - min)) * getrandom16() / 65536.0) + min];
- Anope::string subject = Anope::printf(GetString(na->nc, gtl("Reset password request for %s")).c_str(), na->nick.c_str());
- Anope::string message = Anope::printf(GetString(na->nc, gtl(
+ Anope::string subject = Anope::printf(translate(na->nc, _("Reset password request for %s")), na->nick.c_str());
+ Anope::string message = Anope::printf(translate(na->nc, _(
"Hi,\n"
" \n"
"You have requested to have the password for %s reset.\n"
@@ -147,7 +147,7 @@ static bool SendResetEmail(User *u, NickAlias *na)
" \n"
"If you don't know why this mail was sent to you, please ignore it silently.\n"
" \n"
- "%s administrators.")).c_str(), na->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), na->nick.c_str(), passcode.c_str(), Config->NetworkName.c_str());
+ "%s administrators.")), na->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), na->nick.c_str(), passcode.c_str(), Config->NetworkName.c_str());
na->nc->Extend("ns_resetpass_code", new ExtensibleItemRegular<Anope::string>(passcode));
na->nc->Extend("ns_resetpass_time", new ExtensibleItemRegular<time_t>(Anope::CurTime));
diff --git a/modules/core/ns_sendpass.cpp b/modules/core/ns_sendpass.cpp
index e9ef06d59..d1d47df84 100644
--- a/modules/core/ns_sendpass.cpp
+++ b/modules/core/ns_sendpass.cpp
@@ -98,8 +98,8 @@ static bool SendPassMail(User *u, NickAlias *na, const Anope::string &pass)
{
char subject[BUFSIZE], message[BUFSIZE];
- snprintf(subject, sizeof(subject), GetString(na->nc, gtl("Nickname password (%s)")).c_str(), na->nick.c_str());
- snprintf(message, sizeof(message), GetString(na->nc, gtl(
+ snprintf(subject, sizeof(subject), translate(na->nc, _("Nickname password (%s)")), na->nick.c_str());
+ snprintf(message, sizeof(message), translate(na->nc, _(
"Hi,\n"
" \n"
"You have requested to receive the password of nickname %s by e-mail.\n"
@@ -107,7 +107,7 @@ static bool SendPassMail(User *u, NickAlias *na, const Anope::string &pass)
" \n"
"If you don't know why this mail was sent to you, please ignore it silently.\n"
" \n"
- "%s administrators.")).c_str(), na->nick.c_str(), pass.c_str(), Config->NetworkName.c_str());
+ "%s administrators.")), na->nick.c_str(), pass.c_str(), Config->NetworkName.c_str());
return Mail(u, na->nc, nickserv->Bot(), subject, message);
}
diff --git a/modules/core/ns_set_language.cpp b/modules/core/ns_set_language.cpp
index 98f8f044a..c614e7642 100644
--- a/modules/core/ns_set_language.cpp
+++ b/modules/core/ns_set_language.cpp
@@ -43,8 +43,6 @@ class CommandNSSetLanguage : public Command
}
nc->language = param != "en" ? param : "";
- PopLanguage();
- PushLanguage("anope", nc->language);
source.Reply(_("Language changed to \002English\002."));
return MOD_CONT;
@@ -62,9 +60,7 @@ class CommandNSSetLanguage : public Command
source.Reply(" en (English)");
for (unsigned j = 0; j < languages.size(); ++j)
{
- PushLanguage("anope", languages[j]);
- const Anope::string &langname = _("English");
- PopLanguage();
+ const Anope::string &langname = anope_gettext(languages[j].c_str(), _("English"));
if (langname == "English")
continue;
source.Reply(" %s (%s)", languages[j].c_str(), langname.c_str());
diff --git a/modules/core/os_main.cpp b/modules/core/os_main.cpp
index 1c8203e8d..ec5e95ac8 100644
--- a/modules/core/os_main.cpp
+++ b/modules/core/os_main.cpp
@@ -25,9 +25,7 @@ class OperServBotInfo : public BotInfo
{
if (!u->HasMode(UMODE_OPER) && Config->OSOpersOnly)
{
- PushLanguage("anope", u->Account() ? u->Account()->language : "");
- u->SendMessage(OperServ, _(ACCESS_DENIED));
- PopLanguage();
+ u->SendMessage(OperServ, ACCESS_DENIED);
if (Config->WallBadOS)
ircdproto->SendGlobops(this, "Denied access to %s from %s!%s@%s (non-oper)", Config->s_OperServ.c_str(), u->nick.c_str(), u->GetIdent().c_str(), u->host.c_str());
}
diff --git a/modules/extra/cs_appendtopic.cpp b/modules/extra/cs_appendtopic.cpp
index 5132d272f..bb6702237 100644
--- a/modules/extra/cs_appendtopic.cpp
+++ b/modules/extra/cs_appendtopic.cpp
@@ -87,9 +87,9 @@ class CommandCSAppendTopic : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- me->SendMessage(source, _("Syntax: APPENDTOPIC channel text"));
+ source.Reply(_("Syntax: APPENDTOPIC channel text"));
source.Reply(" ");
- me->SendMessage(source, _("This command allows users to append text to a currently set\n"
+ source.Reply(("This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."));
@@ -98,7 +98,7 @@ class CommandCSAppendTopic : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- me->SendMessage(source, _("Syntax: APPENDTOPIC channel text"));
+ source.Reply(_("Syntax: APPENDTOPIC channel text"));
}
};
diff --git a/modules/extra/cs_enforce.cpp b/modules/extra/cs_enforce.cpp
index 29914a17e..c39744ca2 100644
--- a/modules/extra/cs_enforce.cpp
+++ b/modules/extra/cs_enforce.cpp
@@ -90,7 +90,7 @@ class CommandCSEnforce : public Command
if (check_access(uc->user, ci, CA_NOJOIN))
{
get_idealban(ci, uc->user, mask);
- Anope::string reason = GetString(uc->user->Account(), CHAN_NOT_ALLOWED_TO_JOIN);
+ Anope::string reason = translate(uc->user, CHAN_NOT_ALLOWED_TO_JOIN);
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
@@ -114,7 +114,7 @@ class CommandCSEnforce : public Command
if (!uc->user->IsIdentified())
{
get_idealban(ci, uc->user, mask);
- Anope::string reason = GetString(uc->user->Account(), CHAN_NOT_ALLOWED_TO_JOIN);
+ Anope::string reason = translate(uc->user, CHAN_NOT_ALLOWED_TO_JOIN);
if (!c->HasMode(CMODE_REGISTEREDONLY))
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
@@ -144,27 +144,27 @@ class CommandCSEnforce : public Command
if (what.empty() || what.equals_ci("SET"))
{
this->DoSet(c);
- me->SendMessage(source, _("Enforced %s"), !what.empty() ? what.c_str() : "SET");
+ source.Reply(_("Enforced %s"), !what.empty() ? what.c_str() : "SET");
}
else if (what.equals_ci("MODES"))
{
this->DoModes(c);
- me->SendMessage(source, _("Enforced %s"), what.c_str());
+ source.Reply(_("Enforced %s"), what.c_str());
}
else if (what.equals_ci("SECUREOPS"))
{
this->DoSecureOps(c);
- me->SendMessage(source, _("Enforced %s"), what.c_str());
+ source.Reply(_("Enforced %s"), what.c_str());
}
else if (what.equals_ci("RESTRICTED"))
{
this->DoRestricted(c);
- me->SendMessage(source, _("Enforced %s"), what.c_str());
+ source.Reply(_("Enforced %s"), what.c_str());
}
else if (what.equals_ci("+R"))
{
this->DoCModeR(c);
- me->SendMessage(source, _("Enforced %s"), what.c_str());
+ source.Reply(_("Enforced %s"), what.c_str());
}
else
this->OnSyntaxError(source, "");
@@ -175,9 +175,9 @@ class CommandCSEnforce : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- me->SendMessage(source, _("Syntax: \002ENFORCE \037channel\037 [\037what\037]\002"));
- me->SendMessage(source, " ");
- me->SendMessage(source, _("Enforce various channel modes and set options. The \037channel\037\n"
+ source.Reply(_("Syntax: \002ENFORCE \037channel\037 [\037what\037]\002"));
+ source.Reply(" ");
+ source.Reply(_("Enforce various channel modes and set options. The \037channel\037\n"
"option indicates what channel to enforce the modes and options\n"
"on. The \037what\037 option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
@@ -188,14 +188,14 @@ class CommandCSEnforce : public Command
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."));
- me->SendMessage(source, " ");
+ source.Reply(" ");
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
- me->SendMessage(source, _("If \037what\037 is MODES, it will enforce channelmode +R if it is\n"
+ source.Reply(_("If \037what\037 is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for \037what\037, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."));
else
- me->SendMessage(source, _("If \037what\037 is MODES, nothing will be enforced, since it would\n"
+ source.Reply(_("If \037what\037 is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for \037what\037, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
@@ -207,7 +207,7 @@ class CommandCSEnforce : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- me->SendMessage(source, _("Syntax: \002ENFORCE \037channel\037 [\037what\037]\002"));
+ source.Reply(_("Syntax: \002ENFORCE \037channel\037 [\037what\037]\002"));
}
};
diff --git a/modules/extra/cs_tban.cpp b/modules/extra/cs_tban.cpp
index 003f8a3d5..78c3b1fa9 100644
--- a/modules/extra/cs_tban.cpp
+++ b/modules/extra/cs_tban.cpp
@@ -82,7 +82,7 @@ class CommandCSTBan : public Command
get_idealban(c->ci, u2, mask);
c->SetMode(NULL, CMODE_BAN, mask);
new TempBan(dotime(time), c, mask);
- me->SendMessage(source, _("%s banned from %s, will auto-expire in %s"), mask.c_str(), c->name.c_str(), time.c_str());
+ source.Reply(_("%s banned from %s, will auto-expire in %s"), mask.c_str(), c->name.c_str(), time.c_str());
}
return MOD_CONT;
@@ -91,8 +91,8 @@ class CommandCSTBan : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
this->OnSyntaxError(source, "");
- me->SendMessage(source, " ");
- me->SendMessage(source, _("Bans the given user from a channel for a specified length of\n"
+ source.Reply(" ");
+ source.Reply(_("Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."));
return true;
@@ -100,7 +100,7 @@ class CommandCSTBan : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- me->SendMessage(source, _("Syntax: TBAN channel nick time"));
+ source.Reply(_("Syntax: TBAN channel nick time"));
}
};
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp
index f62e21e1a..518acb6de 100644
--- a/modules/extra/hs_request.cpp
+++ b/modules/extra/hs_request.cpp
@@ -65,7 +65,7 @@ class CommandHSRequest : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- me->SendMessage(source, _("Syntax: \002REQUEST \037vhost\037\002"));
+ source.Reply(_("Syntax: \002REQUEST \037vhost\037\002"));
return MOD_CONT;
}
if (vIdent.length() > Config->UserLen)
@@ -102,13 +102,13 @@ class CommandHSRequest : public Command
if (HSRequestMemoOper && Config->MSSendDelay > 0 && u && u->lastmemosend + Con