summaryrefslogtreecommitdiff
path: root/src/modules/m_silence.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-02-06 00:16:46 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-02-06 00:16:46 +0100
commit43b5073d6f80a8dcb7044ecd127fd5893da033ab (patch)
treef940ee307f891939ecff9e25259fcb6d44204bd1 /src/modules/m_silence.cpp
parentb3bafc6aaee4b6b95c6aaefcc6f2e80eca6bd370 (diff)
parent6ec3d27b2a32ca54d8f62d5cd4b1e8e170ac0783 (diff)
Merge pull request #984 from Renegade334/modules-exempt-uline
Allow U-lined services to bypass m_silence (configurable)
Diffstat (limited to 'src/modules/m_silence.cpp')
-rw-r--r--src/modules/m_silence.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 91822b4e4..502f947f4 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -291,6 +291,7 @@ class CommandSilence : public Command
class ModuleSilence : public Module
{
unsigned int maxsilence;
+ bool ExemptULine;
CommandSilence cmdsilence;
CommandSVSSilence cmdsvssilence;
public:
@@ -302,9 +303,13 @@ class ModuleSilence : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
- maxsilence = ServerInstance->Config->ConfValue("silence")->getInt("maxentries", 32);
+ ConfigTag* tag = ServerInstance->Config->ConfValue("silence");
+
+ maxsilence = tag->getInt("maxentries", 32);
if (!maxsilence)
maxsilence = 32;
+
+ ExemptULine = tag->getBool("exemptuline", true);
}
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
@@ -351,6 +356,9 @@ class ModuleSilence : public Module
ModResult MatchPattern(User* dest, User* source, int pattern)
{
+ if (ExemptULine && source->server->IsULine())
+ return MOD_RES_PASSTHRU;
+
silencelist* sl = cmdsilence.ext.get(dest);
if (sl)
{