]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqlauth.cpp
Sync helpop chmodes s and p with docs
[user/henk/code/inspircd.git] / src / modules / m_sqlauth.cpp
index d2466f719dd7bee9dbf03008d80b75d420fa4d87..0ae51a86eaa339d0bcb79e0bd5b5b3ce3a9e2243 100644 (file)
@@ -1,7 +1,14 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2015 Daniel Vassdal <shutter@canternet.org>
+ *   Copyright (C) 2013, 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012-2015 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+ *   Copyright (C) 2005, 2007-2008, 2010 Craig Edwards <brain@inspircd.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -49,7 +56,7 @@ class AuthQuery : public SQL::Query
 
        void OnResult(SQL::Result& res) CXX11_OVERRIDE
        {
-               LocalUser* user = static_cast<LocalUser*>(ServerInstance->FindUUID(uid));
+               LocalUser* user = IS_LOCAL(ServerInstance->FindUUID(uid));
                if (!user)
                        return;
 
@@ -86,7 +93,7 @@ class AuthQuery : public SQL::Query
                                }
 
                                if (verbose)
-                                       ServerInstance->SNO->WriteGlobalSno('a', "Forbidden connection from %s (Password from the SQL query did not match the user provided password)", user->GetFullRealHost().c_str());
+                                       ServerInstance->SNO->WriteGlobalSno('a', "Forbidden connection from %s (password from the SQL query did not match the user provided password)", user->GetFullRealHost().c_str());
                                pendingExt.set(user, AUTH_STATE_FAIL);
                                return;
                        }
@@ -171,7 +178,7 @@ class ModuleSQLAuth : public Module
 
                if (!SQL)
                {
-                       ServerInstance->SNO->WriteGlobalSno('a', "Forbiding connection from %s (SQL database not present)", user->GetFullRealHost().c_str());
+                       ServerInstance->SNO->WriteGlobalSno('a', "Forbidden connection from %s (SQL database not present)", user->GetFullRealHost().c_str());
                        ServerInstance->Users->QuitUser(user, killreason);
                        return MOD_RES_PASSTHRU;
                }
@@ -212,7 +219,7 @@ class ModuleSQLAuth : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Allow/Deny connections based upon an arbitrary SQL table", VF_VENDOR);
+               return Version("Allows connecting users to be authenticated against an arbitrary SQL table.", VF_VENDOR);
        }
 };