1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 13:36:38 +02:00

Improve how Anope formats C strings.

This commit is contained in:
Sadie Powell
2025-08-02 18:09:31 +01:00
parent e6e812c43c
commit b2d40d4189
40 changed files with 157 additions and 183 deletions
+2 -2
View File
@@ -463,7 +463,7 @@ private:
if (!cm || !cm->mchar)
return;
Uplink::Send(user, "SVS2MODE", c->name, Anope::printf("-%c", cm->mchar), u->GetUID());
Uplink::Send(user, "SVS2MODE", c->name, Anope::Format("-%c", cm->mchar), u->GetUID());
}
bool IsTagValid(const Anope::string &tname, const Anope::string &tvalue) override
@@ -492,7 +492,7 @@ namespace UnrealExtBan
ChannelMode *Wrap(Anope::string &param) override
{
auto prefix = Servers::Capab.count("NEXTBANS") ? xbname : Anope::string(xbchar);
param = Anope::printf("~%s:%s", prefix.c_str(), param.c_str());
param = Anope::Format("~%s:%s", prefix.c_str(), param.c_str());
return ChannelModeVirtual<ChannelModeList>::Wrap(param);
}