1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 08:36:41 +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
@@ -174,9 +174,9 @@ public:
if (!this->CheckInit() || obj->GetTimestamp() == Anope::CurTime)
return;
Anope::string sql = Anope::printf("SELECT * from `%s`", GetTableName(obj).c_str());
Anope::string sql = Anope::Format("SELECT * from `%s`", GetTableName(obj).c_str());
if (obj->GetTimestamp())
sql += Anope::printf(" WHERE (`timestamp` >= %s OR `timestamp` IS NULL)", this->SQL->FromUnixtime(obj->GetTimestamp()).c_str());
sql += Anope::Format(" WHERE (`timestamp` >= %s OR `timestamp` IS NULL)", this->SQL->FromUnixtime(obj->GetTimestamp()).c_str());
Query query(sql);