X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dccallow.cpp;h=10a8d9310f822d366fbd06a10f1a90a8eaab4884;hb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;hp=13a8884d8f975100977015292f734381e46e7a0d;hpb=1fd1b98ced9474d3358dc10dfc18580aa5351ed7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 13a8884d8..10a8d9310 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -1,27 +1,30 @@ - /* m_dccallow - Jamie Penman-Smithson - September 2006 */ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/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 */ static ConfigReader *Conf; -class BannedFileList +class BannedFileList : public classbase { public: std::string filemask; std::string action; }; -class DCCAllow +class DCCAllow : public classbase { public: std::string nickname; @@ -31,94 +34,80 @@ class 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) + CommandDccallow(Module* parent) : Command(parent, "DCCALLOW", 0) { - this->source = "m_dccallow.so"; - syntax = "{[+|-]