X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sqloper.cpp;h=c2e26b0364a7a6e7d818ba78cf10032c8f853a47;hb=HEAD;hp=da538caef63876d441663302b872efaf8b27a920;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index da538caef..c2e26b036 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -1,8 +1,15 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017 Dylan Frank + * Copyright (C) 2019 B00mX0r + * Copyright (C) 2018 Dylan Frank + * Copyright (C) 2013-2014, 2018 Attila Molnar + * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell + * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Uli Schlachter + * Copyright (C) 2007-2008 Dennis Friis + * Copyright (C) 2005-2007, 2010 Craig Edwards * * 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 @@ -96,6 +103,7 @@ class OperQuery : public SQL::Query ifo->class_blocks.assign(tblk->second->class_blocks.begin(), tblk->second->class_blocks.end()); oper_blocks[name] = ifo; my_blocks.push_back(name); + row.clear(); } // If this was done as a result of /OPER and not a config read @@ -109,7 +117,7 @@ class OperQuery : public SQL::Query void OnError(SQL::Error& error) CXX11_OVERRIDE { ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "query failed (%s)", error.ToString()); - ServerInstance->SNO->WriteGlobalSno('a', "m_sqloper: failed to update blocks from database"); + ServerInstance->SNO->WriteGlobalSno('a', "m_sqloper: Failed to update blocks from database"); if (!uid.empty()) { // Fallback. We don't want to block a netadmin from /OPER @@ -182,7 +190,7 @@ public: else SQL.SetProvider("SQL/" + dbid); - query = tag->getString("query", "SELECT * FROM ircd_opers WHERE active=1;"); + query = tag->getString("query", "SELECT * FROM ircd_opers WHERE active=1;", 1); // Update sqloper list from the database. GetOperBlocks(); } @@ -241,7 +249,7 @@ public: Version GetVersion() CXX11_OVERRIDE { - return Version("Allows storage of oper credentials in an SQL table", VF_VENDOR); + return Version("Allows server operators to be authenticated against an SQL table.", VF_VENDOR); } };