From 75e7eaceba5031927445d5fc9861c8c107fdaa8f Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Sat, 21 Feb 2015 12:46:40 +0100 Subject: m_sqloper.cpp: Add support for the `active` column When active is true the user is allowed to log in. When it is FALSE, he is not. 2.0 users must alter their table (or view) so that it contains this field. --- src/modules/m_sqloper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index bc46bd7e7..b5f0d6c47 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -122,7 +122,7 @@ public: SQL.SetProvider("SQL/" + dbid); hashtype = tag->getString("hash"); - query = tag->getString("query", "SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password'"); + query = tag->getString("query", "SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password' AND active=1;"); } ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE -- cgit v1.2.3