X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dccallow.cpp;h=cc7fbd323020b50757b466de89d11a66526324da;hb=df4afba6c23c939af1013582c94138832017af4e;hp=7ddce8ab09f9f0a5e8af22e2d2a1c224156f800a;hpb=694e307c09334c21aaf1a6c3f0b7b6d95440dd3e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 7ddce8ab0..cc7fbd323 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -1,21 +1,29 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008 John Brooks + * Copyright (C) 2008 Pippijn van Steenhoven + * Copyright (C) 2006-2008 Craig Edwards + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006 Jamie ??? * - * 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: Povides support for the /DCCALLOW command */ -static ConfigReader *Conf; +#include "inspircd.h" class BannedFileList { @@ -37,91 +45,81 @@ class DCCAllow DCCAllow(const std::string &nick, const std::string &hm, const time_t so, const long ln) : nickname(nick), hostmask(hm), set_on(so), length(ln) { } }; -typedef std::vector userlist; +typedef std::vector userlist; userlist ul; typedef std::vector dccallowlist; dccallowlist* dl; typedef std::vector bannedfilelist; bannedfilelist bfl; +typedef SimpleExtItem DCCAllowExt; -class cmd_dccallow : public Command +class CommandDccallow : public Command { + DCCAllowExt& ext; + public: - cmd_dccallow(InspIRCd* Me) : Command(Me, "DCCALLOW", 0, 0) + CommandDccallow(Module* parent, DCCAllowExt& Ext) + : Command(parent, "DCCALLOW", 0) + , ext(Ext) { - this->source = "m_dccallow.so"; - syntax = "{[+|-]