summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-06-24 13:29:41 +0100
committerSadie Powell <sadie@witchery.services>2024-06-24 13:30:17 +0100
commit6e5713d64a379fc64c7ff6658362d02b3618c3ca (patch)
tree013fe8b9831fb514502b7f07669929bd484ee45d /modules
parent249ad3dfea933310f10947cc03f6fe85ab116b81 (diff)
Remove the formatting overloads of SendNotice/SendPrivmsg.
Diffstat (limited to 'modules')
-rw-r--r--modules/botserv/botserv.cpp3
-rw-r--r--modules/botserv/bs_control.cpp2
-rw-r--r--modules/chanserv/cs_log.cpp4
-rw-r--r--modules/greet.cpp3
-rw-r--r--modules/protocol/inspircd.cpp4
5 files changed, 9 insertions, 7 deletions
diff --git a/modules/botserv/botserv.cpp b/modules/botserv/botserv.cpp
index 706865522..c9172ba0e 100644
--- a/modules/botserv/botserv.cpp
+++ b/modules/botserv/botserv.cpp
@@ -75,7 +75,8 @@ public:
{
ChannelMode *cm = ModeManager::FindChannelModeByName("OP");
char symbol = cm ? anope_dynamic_static_cast<ChannelModeStatus *>(cm)->symbol : 0;
- IRCD->SendNotice(bi, (symbol ? Anope::string(symbol) : "") + c->name, "%s invited %s into the channel.", user->nick.c_str(), user->nick.c_str());
+ const auto message = Anope::printf("%s invited %s into the channel.", user->nick.c_str(), user->nick.c_str());
+ IRCD->SendNotice(bi, (symbol ? Anope::string(symbol) : "") + c->name, message);
}
ModeManager::ProcessModes();
diff --git a/modules/botserv/bs_control.cpp b/modules/botserv/bs_control.cpp
index 32101be6e..1784914b6 100644
--- a/modules/botserv/bs_control.cpp
+++ b/modules/botserv/bs_control.cpp
@@ -56,7 +56,7 @@ public:
return;
}
- IRCD->SendPrivmsg(*ci->bi, ci->name, "%s", text.c_str());
+ IRCD->SendPrivmsg(*ci->bi, ci->name, text);
ci->bi->lastmsg = Anope::CurTime;
bool override = !source.AccessFor(ci).HasPriv("SAY");
diff --git a/modules/chanserv/cs_log.cpp b/modules/chanserv/cs_log.cpp
index 8c1004eeb..defd38287 100644
--- a/modules/chanserv/cs_log.cpp
+++ b/modules/chanserv/cs_log.cpp
@@ -391,11 +391,11 @@ public:
/* Sending a channel message or notice in response to a fantasy command */;
else if (log->method.equals_ci("MESSAGE") && l->ci->c)
{
- IRCD->SendPrivmsg(l->ci->WhoSends(), log->extra + l->ci->c->name, "%s", buffer.c_str());
+ IRCD->SendPrivmsg(l->ci->WhoSends(), log->extra + l->ci->c->name, buffer);
l->ci->WhoSends()->lastmsg = Anope::CurTime;
}
else if (log->method.equals_ci("NOTICE") && l->ci->c)
- IRCD->SendNotice(l->ci->WhoSends(), log->extra + l->ci->c->name, "%s", buffer.c_str());
+ IRCD->SendNotice(l->ci->WhoSends(), log->extra + l->ci->c->name, buffer);
}
}
}
diff --git a/modules/greet.cpp b/modules/greet.cpp
index 1260b3a28..670ff37ba 100644
--- a/modules/greet.cpp
+++ b/modules/greet.cpp
@@ -198,7 +198,8 @@ public:
Anope::string *greet = ns_greet.Get(user->Account());
if (bs_greet.HasExt(c->ci) && greet != NULL && !greet->empty() && c->FindUser(c->ci->bi) && c->ci->AccessFor(user).HasPriv("GREET"))
{
- IRCD->SendPrivmsg(*c->ci->bi, c->name, "[%s] %s", user->Account()->display.c_str(), greet->c_str());
+ const auto message = Anope::printf("[%s] %s", user->Account()->display.c_str(), greet->c_str());
+ IRCD->SendPrivmsg(*c->ci->bi, c->name, message);
c->ci->bi->lastmsg = Anope::CurTime;
}
}
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index 3dd26931b..e3cf294f4 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -207,7 +207,7 @@ public:
{
if (spanningtree_proto_ver >= 1206)
{
- IRCD->SendNoticeInternal(bi, target->GetUID(), msg, {
+ IRCD->SendNotice(bi, target->GetUID(), msg, {
{ "~context", context->name },
});
return;
@@ -219,7 +219,7 @@ public:
{
if (spanningtree_proto_ver >= 1206)
{
- IRCD->SendPrivmsgInternal(bi, target->GetUID(), msg, {
+ IRCD->SendPrivmsg(bi, target->GetUID(), msg, {
{ "~context", context->name },
});
return;