X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sqloper.cpp;h=b6aa90f490f080819611a27795a463c95c45bfca;hb=4aa27e75af8da0a5bc2e35f931f0165339f5f289;hp=bc46bd7e714904c8be9dcebd0fa30becee0a1216;hpb=3a3ff949670c61a4a8856e1391222e156eb1cd17;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index bc46bd7e7..b6aa90f49 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -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 ¶meters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE