#include <sys/types.h>
#include <regex.h>
-/* $ModDesc: Regex Provider Module for POSIX Regular Expressions */
-/* $ModDep: modules/regex.h */
-
class POSIXRegexException : public ModuleException
{
public:
}
}
- virtual ~POSIXRegex()
+ ~POSIXRegex()
{
regfree(®buf);
}
- virtual bool Matches(const std::string& text)
+ bool Matches(const std::string& text)
{
if (regexec(®buf, text.c_str(), 0, NULL, 0) == 0)
{
ModuleRegexPOSIX() : ref(this)
{
ServerInstance->Modules->AddService(ref);
- Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
- Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Regex Provider Module for POSIX Regular Expressions", VF_VENDOR);
}
- void OnRehash(User* u)
+ void OnRehash(User* u) CXX11_OVERRIDE
{
ref.extended = ServerInstance->Config->ConfValue("posix")->getBool("extended");
}