]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_xline/core_xline.cpp
Improve the logging of the httpd module.
[user/henk/code/inspircd.git] / src / coremods / core_xline / core_xline.cpp
index c53834fc0a5636b1ec3f7953a6f154f153d84498..568b7d2693e2a96bf0c4e167e80fdf4a6722ea17 100644 (file)
@@ -1,7 +1,11 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ *   Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
+ *   Copyright (C) 2018-2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2014, 2016 Attila Molnar <attilamolnar@hush.com>
  *
  * 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
@@ -38,7 +42,7 @@ bool InsaneBan::MatchesEveryone(const std::string& mask, MatcherBase& test, User
        float percent = ((float)matches / (float)ServerInstance->Users->GetUsers().size()) * 100;
        if (percent > itrigger)
        {
-               ServerInstance->SNO->WriteToSnoMask('a', "\2WARNING\2: %s tried to set a %s-line mask of %s, which covers %.2f%% of the network!", user->nick.c_str(), bantype, mask.c_str(), percent);
+               ServerInstance->SNO->WriteToSnoMask('a', "\002WARNING\002: %s tried to set a %s-line mask of %s, which covers %.2f%% of the network!", user->nick.c_str(), bantype, mask.c_str(), percent);
                return true;
        }
        return false;
@@ -93,6 +97,14 @@ class CoreModXLine : public Module
                return MOD_RES_DENY;
        }
 
+       void OnGarbageCollect() CXX11_OVERRIDE
+       {
+               // HACK: ELines are not expired properly at the moment but it can't be fixed
+               // as the XLine system is a spaghetti nightmare. Instead we skip over expired
+               // ELines in XLineManager::CheckELines() and expire them here instead.
+               ServerInstance->XLines->GetAll("E");
+       }
+
        Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides the ELINE, GLINE, KLINE, QLINE, and ZLINE commands", VF_VENDOR|VF_CORE);