diff options
| author | 2021-01-13 00:53:32 +0000 | |
|---|---|---|
| committer | 2021-01-13 01:02:33 +0000 | |
| commit | bcc3f983772e7042fd969a98f692cef2a9201cae (patch) | |
| tree | bb9c4dfb572dcb39557f2adbde311eb574725883 /src/modules/m_shun.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
| parent | Add a shun option to only apply when users are fully connected. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_shun.cpp')
| -rw-r--r-- | src/modules/m_shun.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 16e35275c..ce5399b57 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -155,11 +155,16 @@ class ModuleShun : public Module, public Stats::EventListener ShunFactory shun; insp::flat_set<std::string, irc::insensitive_swo> cleanedcommands; insp::flat_set<std::string, irc::insensitive_swo> enabledcommands; + bool allowconnect; bool allowtags; bool notifyuser; bool IsShunned(LocalUser* user) { + // Exempt the user if they are not fully connected and allowconnect is enabled. + if (allowconnect && user->registered != REG_ALL) + return false; + // Exempt the user from shuns if they are an oper with the servers/ignore-shun privilege. if (user->HasPrivPermission("servers/ignore-shun")) return false; @@ -217,6 +222,7 @@ class ModuleShun : public Module, public Stats::EventListener enabledcommands.insert(enabledcmd); allowtags = tag->getBool("allowtags"); + allowconnect = tag->getBool("allowconnect"); notifyuser = tag->getBool("notifyuser", true); } |
