mirror of
https://github.com/anope/anope.git
synced 2026-06-27 23:36:39 +02:00
Fixed some 100% cpu bugs with the new SQL stuff, and fixed sqlite+db_sql_live
This commit is contained in:
@@ -53,6 +53,8 @@ class SQLiteService : public SQLProvider
|
||||
SQLQuery GetTables(const Anope::string &prefix);
|
||||
|
||||
Anope::string BuildQuery(const SQLQuery &q);
|
||||
|
||||
Anope::string FromUnixtime(time_t);
|
||||
};
|
||||
|
||||
class ModuleSQLite : public Module
|
||||
@@ -297,5 +299,10 @@ Anope::string SQLiteService::BuildQuery(const SQLQuery &q)
|
||||
return real_query;
|
||||
}
|
||||
|
||||
Anope::string SQLiteService::FromUnixtime(time_t t)
|
||||
{
|
||||
return "datetime('" + stringify(t) + "', 'unixepoch')";
|
||||
}
|
||||
|
||||
MODULE_INIT(ModuleSQLite)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user