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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user