From 18afeadae4c6520388777fbd3d371402b5aeae9f Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 8 Mar 2006 12:11:02 +0000 Subject: Changed m_sqlauth to allow more advanced encryption types git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3549 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_sqlauth.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 0f5fde5f3..6a760e198 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -64,6 +64,10 @@ class ModuleSQLAuth : public Module // define, but leave blank if no encryption is to be used. WallOperFail = Conf->ReadFlag("sqlauth","verbose",0); // set to 1 if failed connects should be reported to operators allowpattern = Conf->ReadValue("sqlauth","allowpattern",0); // allow nicks matching the pattern without requiring auth + if (encryption.find("(") == std::string::npos) + { + encryption.append("("); + } delete Conf; SQLModule = Srv->FindModule("m_sql.so"); if (!SQLModule) @@ -126,7 +130,7 @@ class ModuleSQLAuth : public Module password = temp; // Create a request containing the SQL query and send it to m_sql.so - std::string querystr("SELECT * FROM "+usertable+" WHERE "+userfield+"='"+username+"' AND "+passfield+"="+encryption+"('"+password+"')"); + std::string querystr("SELECT * FROM "+usertable+" WHERE "+userfield+"='"+username+"' AND "+passfield+"="+encryption+"'"+password+"')"); Srv->Log(DEBUG, "m_sqlauth.so: Query: " + querystr); -- cgit v1.2.3