]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqloper.cpp
m_callerid Route ACCEPT to the server of the target user only, do not send METADATA...
[user/henk/code/inspircd.git] / src / modules / m_sqloper.cpp
index 87ab7d46f32f54a88199ff979127e1a23a7665d3..0ae468576ef1c75a0d76aa213cf445886aa3a469 100644 (file)
@@ -32,9 +32,9 @@ class OpMeQuery : public SQLQuery
        {
        }
 
-       void OnResult(SQLResult& res)
+       void OnResult(SQLResult& res) CXX11_OVERRIDE
        {
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: result for %s", uid.c_str());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEBUG, "SQLOPER: result for %s", uid.c_str());
                User* user = ServerInstance->FindNick(uid);
                if (!user)
                        return;
@@ -46,14 +46,14 @@ class OpMeQuery : public SQLQuery
                        if (OperUser(user, row[0], row[1]))
                                return;
                }
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
                // nobody succeeded... fall back to OPER
                fallback();
        }
 
-       void OnError(SQLerror& error)
+       void OnError(SQLerror& error) CXX11_OVERRIDE
        {
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: query failed (%s)", error.Str());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: query failed (%s)", error.Str());
                fallback();
        }
 
@@ -74,7 +74,7 @@ class OpMeQuery : public SQLQuery
                }
                else
                {
-                       ServerInstance->Logs->Log("m_sqloper",LOG_SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
+                       ServerInstance->Logs->Log("m_sqloper", LOG_SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
                }
        }
 
@@ -83,7 +83,7 @@ class OpMeQuery : public SQLQuery
                OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + type);
                if (iter == ServerInstance->Config->oper_blocks.end())
                {
-                       ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
+                       ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
                        return false;
                }
                OperInfo* ifo = iter->second;
@@ -113,7 +113,7 @@ class ModuleSQLOper : public Module
 public:
        ModuleSQLOper() : SQL(this, "SQL") {}
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                OnRehash(NULL);
 
@@ -121,7 +121,7 @@ public:
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       void OnRehash(User* user)
+       void OnRehash(User* user) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("sqloper");
 
@@ -135,7 +135,7 @@ public:
                query = tag->getString("query", "SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password'");
        }
 
-       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line)
+       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE
        {
                if (validated && command == "OPER" && parameters.size() >= 2)
                {
@@ -145,7 +145,7 @@ public:
                                /* Query is in progress, it will re-invoke OPER if needed */
                                return MOD_RES_DENY;
                        }
-                       ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: database not present");
+                       ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: database not present");
                }
                return MOD_RES_PASSTHRU;
        }
@@ -162,7 +162,7 @@ public:
                SQL->submit(new OpMeQuery(this, user->uuid, username, password), query, userinfo);
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Allows storage of oper credentials in an SQL table", VF_VENDOR);
        }