X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_regex.h;h=0233f938a6ba38de9b153a3ebd1d89bcb1f8a9ac;hb=553a8da754c8cd308bad2008018849714e70f9b7;hp=c8cbc10b69c6c3db1a36df45a8dc186200a881ec;hpb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_regex.h b/src/modules/m_regex.h index c8cbc10b6..0233f938a 100644 --- a/src/modules/m_regex.h +++ b/src/modules/m_regex.h @@ -1,18 +1,25 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008 Thomas Stagner * - * 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 . */ -#ifndef _M_REGEX_H -#define _M_REGEX_H + +#ifndef M_REGEX_H +#define M_REGEX_H #include "inspircd.h" @@ -40,36 +47,12 @@ public: } }; -class RegexFactoryRequest : public Request +class RegexFactory : public DataProvider { -private: - std::string regex; - -public: - Regex* result; - - RegexFactoryRequest(Module* Me, Module* Target, const std::string& rx) : Request(Me, Target, "REGEX"), regex(rx), result(NULL) - { - } - - const std::string& GetRegex() const - { - return regex; - } - - Regex* Create() - { - Send(); - return this->result; - } -}; + public: + RegexFactory(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) {} -class RegexNameRequest : public Request -{ -public: - RegexNameRequest(Module* Me, Module* Target) : Request(Me, Target, "REGEX-NAME") - { - } + virtual Regex* Create(const std::string& expr) = 0; }; #endif