From c21bdadf547274d58e6b3deb402d0fa702b43355 Mon Sep 17 00:00:00 2001 From: jamie Date: Mon, 16 Oct 2006 03:07:11 +0000 Subject: Add m_dccallow module and detail configuration in inspircd.conf.example git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5468 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_dccallow.cpp | 513 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 513 insertions(+) create mode 100644 src/modules/m_dccallow.cpp (limited to 'src') diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp new file mode 100644 index 000000000..033138a98 --- /dev/null +++ b/src/modules/m_dccallow.cpp @@ -0,0 +1,513 @@ + /* m_dccallow - Jamie Penman-Smithson - September 2006 */ + +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 +{ + public: + std::string filemask; + std::string action; +}; + +class DCCAllow +{ + public: + std::string nickname; + std::string hostmask; + time_t set_on; + long length; + + DCCAllow() { } + + DCCAllow(std::string nick, std::string hm, time_t so, long ln) : nickname(nick), hostmask(hm), set_on(so), length(ln) { } +}; + +typedef std::vector userlist; +userlist ul; +typedef std::vector dccallowlist; +dccallowlist* dl; +typedef std::vector bannedfilelist; +bannedfilelist bfl; + +class cmd_dccallow : public command_t +{ + public: + cmd_dccallow(InspIRCd* Me) : command_t(Me, "DCCALLOW", 0, 0) + { + this->source = "m_dccallow.so"; + syntax = "{[+|-]