]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_mysql.cpp
Fix some remaining uses of ato[il].
[user/henk/code/inspircd.git] / src / modules / extra / m_mysql.cpp
index 7c67296033a235c7daa04b224fc45b9a426820af..c50d2abf5dec7df899af121427770d12dbf87290 100644 (file)
 /// $CompilerFlags: execute("mysql_config --include" "MYSQL_CXXFLAGS")
 /// $LinkerFlags: execute("mysql_config --libs_r" "MYSQL_LDFLAGS" "-lmysqlclient")
 
+/// $PackageInfo: require_system("arch") mariadb-libs
 /// $PackageInfo: require_system("centos" "6.0" "6.99") mysql-devel
 /// $PackageInfo: require_system("centos" "7.0") mariadb-devel
 /// $PackageInfo: require_system("darwin") mysql-connector-c
 /// $PackageInfo: require_system("debian") libmysqlclient-dev
 /// $PackageInfo: require_system("ubuntu") libmysqlclient-dev
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+#endif
 
 // Fix warnings about the use of `long long` on C++03.
 #if defined __clang__
 #include <mysql.h>
 #include "modules/sql.h"
 
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
 #ifdef _WIN32
 # pragma comment(lib, "libmysql.lib")
 #endif
@@ -68,7 +76,7 @@
  * The ircd thread then mutexes the queue once more, reads the outbound response off the head
  * of the queue, and sends it on its way to the original calling module.
  *
- * XXX: You might be asking "why doesnt he just send the response from within the worker thread?"
+ * XXX: You might be asking "why doesnt it just send the response from within the worker thread?"
  * The answer to this is simple. The majority of InspIRCd, and in fact most ircd's are not
  * threadsafe. This module is designed to be threadsafe and is careful with its use of threads,
  * however, if we were to call a module's OnRequest even from within a thread which was not the
@@ -334,6 +342,7 @@ class SQLConnection : public SQL::Provider
 
        void Submit(SQL::Query* q, const std::string& qs) CXX11_OVERRIDE
        {
+               ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Executing MySQL query: " + qs);
                Parent()->Dispatcher->LockQueue();
                Parent()->qq.push_back(QQueueItem(q, qs, this));
                Parent()->Dispatcher->UnlockQueueWakeup();
@@ -500,7 +509,7 @@ void ModuleSQL::OnUnloadModule(Module* mod)
 
 Version ModuleSQL::GetVersion()
 {
-       return Version("MySQL support", VF_VENDOR);
+       return Version("Provides MySQL support", VF_VENDOR);
 }
 
 void DispatcherThread::Run()