X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dccallow.cpp;h=829c1d3378ce91a3229f4de51ef15a6fc7a47611;hb=9f69e159adcc0892f0bdef16ac4617630737b156;hp=02331ce82fa61ff1ce25537640addbfd8bdd56bc;hpb=618a79478aa9b6ad819c3515a86d25628725e560;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 02331ce82..829c1d337 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -1,512 +1,499 @@ - /* m_dccallow - Jamie Penman-Smithson - September 2006 */ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * 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 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 . + */ -using namespace std; -#include -#include -#include -#include "users.h" -#include "channels.h" -#include "modules.h" #include "inspircd.h" -/* $ModDesc: Povides support for the /DCCALLOW command */ - -static ConfigReader *Conf; +/* $ModDesc: Provides support for the /DCCALLOW command */ class BannedFileList { public: -std::string filemask; -std::string action; + std::string filemask; + std::string action; }; class DCCAllow { public: -std::string nickname; -std::string hostmask; -time_t set_on; -long length; + std::string nickname; + std::string hostmask; + time_t set_on; + long length; -DCCAllow() { } + DCCAllow() { } -DCCAllow(std::string nick, std::string hm, time_t so, long ln) : nickname(nick), hostmask(hm), set_on(so), length(ln) { } + 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; +SimpleExtItem* ext; -class cmd_dccallow : public command_t +class CommandDccallow : public Command { public: -cmd_dccallow(InspIRCd* Me) : command_t(Me, "DCCALLOW", 0, 0) -{ - this->source = "m_dccallow.so"; - syntax = "{[+|-]