diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-21 12:04:43 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-22 13:02:19 +0100 |
commit | 35b70631f0532a5828b04a8e0c02092a285f331a (patch) | |
tree | 9e54fba45e659f23fb3b94341debfc0b23bc63af /src/modules/m_banredirect.cpp | |
parent | 46e71e2f509eb38166fafcc69931117f0f9b7798 (diff) | |
parent | dd3b11b3aa4eb6cb0b6aff4b245a9b075759737d (diff) |
Merge tag 'v2.0.26' into master.
Diffstat (limited to 'src/modules/m_banredirect.cpp')
-rw-r--r-- | src/modules/m_banredirect.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 4a4188757..5ec75f13c 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -182,6 +182,21 @@ class BanRedirect : public ModeWatcher redirects = new BanRedirectList; extItem.set(channel, redirects); } + else + { + for (BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); ++redir) + { + // Mimic the functionality used when removing the mode + if (irc::equals(redir->targetchan, mask[CHAN]) && irc::equals(redir->banmask, param)) + { + // Make sure the +b handler will still set the right ban + param.append(mask[CHAN]); + // Silently ignore the duplicate and don't set metadata + // This still allows channel ops to set/unset a redirect ban to clear "ghost" redirects + return true; + } + } + } /* Here 'param' doesn't have the channel on it yet */ redirects->push_back(BanRedirectEntry(mask[CHAN], param)); |