X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_securelist.cpp;h=c13e1a8928fa3bf6a878c90ce50d8b0968299f5e;hb=6b929c6dbb3d36c3873ab9911ad4d8a46ddbdc99;hp=91dc3a0cde6f6a2c6cfb9e3ce43a0fb2acff1400;hpb=67a4a9b62355ea57a2f4521ca5fc53bd4eac3a1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index 91dc3a0cd..c13e1a892 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -1,16 +1,24 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2006-2007 Craig Edwards * - * This program is free but copyrighted software; see - * the file COPYING for details. + * 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 + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" /* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */ @@ -38,14 +46,13 @@ class ModuleSecureList : public Module void OnRehash(User* user) { - ConfigReader* MyConf = new ConfigReader; + ConfigReader MyConf; allowlist.clear(); - for (int i = 0; i < MyConf->Enumerate("securehost"); i++) - allowlist.push_back(MyConf->ReadValue("securehost", "exception", i)); + for (int i = 0; i < MyConf.Enumerate("securehost"); i++) + allowlist.push_back(MyConf.ReadValue("securehost", "exception", i)); - WaitTime = MyConf->ReadInteger("securelist", "waittime", "60", 0, true); - delete MyConf; + WaitTime = MyConf.ReadInteger("securelist", "waittime", "60", 0, true); } @@ -53,7 +60,7 @@ class ModuleSecureList : public Module * OnPreCommand() * Intercept the LIST command. */ - virtual ModResult OnPreCommand(std::string &command, std::vector ¶meters, User *user, bool validated, const std::string &original_line) + virtual ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) { /* If the command doesnt appear to be valid, we dont want to mess with it. */ if (!validated)