X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dccallow.cpp;h=572188b7c0065db75104ea7e2262ec659e656756;hb=ccd95e668a3bcbd26c4cd2984cdd8809347f9815;hp=44e001eed02b7e362fb11433c72972bad8feb8a2;hpb=a7bd84cb31129d445e1c9d4c208e96dc1929898e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 44e001eed..572188b7c 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -1,13 +1,16 @@ - /* m_dccallow - Jamie Penman-Smithson - September 2006 */ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ -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 */ @@ -17,497 +20,452 @@ static ConfigReader *Conf; 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; -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 = "{[+|-]