]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_filter.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_filter.cpp
index c0fc47b648df7b535fe23b0b5566440beb9e9b4f..d60dd794272fe123d85399003e75e796db808227 100644 (file)
@@ -301,8 +301,6 @@ ModuleFilter::ModuleFilter()
 void ModuleFilter::init()
 {
        ServerInstance->Modules->AddService(filtcommand);
-       Implementation eventlist[] = { I_OnPreCommand, I_OnStats, I_OnSyncNetwork, I_OnDecodeMetaData, I_OnUserPreMessage, I_OnRehash, I_OnUnloadModule };
-       ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        OnRehash(NULL);
 }
 
@@ -375,7 +373,7 @@ ModResult ModuleFilter::OnUserPreMessage(User* user, void* dest, int target_type
                                delete gl;
                }
 
-               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
+               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
                return MOD_RES_DENY;
        }
        return MOD_RES_PASSTHRU;
@@ -677,7 +675,7 @@ void ModuleFilter::ReadFilters()
                std::string reason = i->second->getString("reason");
                std::string action = i->second->getString("action");
                std::string flgs = i->second->getString("flags");
-               unsigned long gline_time = InspIRCd::Duration(i->second->getString("duration"));
+               unsigned long gline_time = i->second->getDuration("duration", 10*60, 1);
                if (flgs.empty())
                        flgs = "*";