]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_regex_posix.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / extra / m_regex_posix.cpp
index 513f54cfc6972a97a368a16084608035936a6a5c..ab9fe68ff3ec0fee5b51e6f17ed7029372baefc2 100644 (file)
 
 
 #include "inspircd.h"
-#include "m_regex.h"
+#include "modules/regex.h"
 #include <sys/types.h>
 #include <regex.h>
 
-/* $ModDesc: Regex Provider Module for POSIX Regular Expressions */
-/* $ModDep: m_regex.h */
-
 class POSIXRegexException : public ModuleException
 {
  public:
@@ -61,12 +58,12 @@ class POSIXRegex : public Regex
                }
        }
 
-       virtual ~POSIXRegex()
+       ~POSIXRegex()
        {
                regfree(&regbuf);
        }
 
-       virtual bool Matches(const std::string& text)
+       bool Matches(const std::string& text)
        {
                if (regexec(&regbuf, text.c_str(), 0, NULL, 0) == 0)
                {
@@ -96,17 +93,15 @@ class ModuleRegexPOSIX : public Module
        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");
        }