]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqloper.cpp
Rename the spanningtree module header to server.
[user/henk/code/inspircd.git] / src / modules / m_sqloper.cpp
index bc46bd7e714904c8be9dcebd0fa30becee0a1216..b6aa90f490f080819611a27795a463c95c45bfca 100644 (file)
@@ -88,7 +88,7 @@ class OpMeQuery : public SQLQuery
 
                std::string hostname(user->ident);
 
-               hostname.append("@").append(user->host);
+               hostname.append("@").append(user->GetRealHost());
 
                if (InspIRCd::MatchMask(pattern, hostname, user->GetIPString()))
                {
@@ -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<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE