diff options
author | Adam <Adam@anope.org> | 2012-05-08 18:04:49 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-05-08 18:04:49 -0400 |
commit | 820e4edc2bfc132a526e5c6db51d94f10ddc4542 (patch) | |
tree | a6daebbc9958f312475699a061a99ee533cd0858 /modules/extra/m_mysql.cpp | |
parent | 25586f32467334f0366ce0b8bfe16e2d5e005851 (diff) |
Fixed some 100% cpu bugs with the new SQL stuff, and fixed sqlite+db_sql_live
Diffstat (limited to 'modules/extra/m_mysql.cpp')
-rw-r--r-- | modules/extra/m_mysql.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 2edf21745..fef040336 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -135,6 +135,8 @@ class MySQLService : public SQLProvider bool CheckConnection(); Anope::string BuildQuery(const SQLQuery &q); + + Anope::string FromUnixtime(time_t); }; /** The SQL thread used to execute queries @@ -481,6 +483,11 @@ Anope::string MySQLService::BuildQuery(const SQLQuery &q) return real_query; } +Anope::string MySQLService::FromUnixtime(time_t t) +{ + return "FROM_UNIXTIME(" + stringify(t) + ")"; +} + void DispatcherThread::Run() { this->Lock(); |