diff options
author | Daniel Vassdal <shutter@canternet.org> | 2013-06-02 14:10:24 -0700 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-16 21:28:08 +0200 |
commit | aae0f30aee91bd7eac229e5746892735e65a5d20 (patch) | |
tree | d276c4dacf546b4cfe870e5cde70f50852acd2ac /src | |
parent | 95593de52c9b89dd3dae8d79a2c76efc81d9d353 (diff) |
m_banredirect Accept channel names starting with #! and #@
Fixes #504 reported by @mechasr
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_banredirect.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index a88324fe2..20b3a62e2 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -90,23 +90,25 @@ class BanRedirect : public ModeWatcher switch(*curr) { case '!': + if (current != NICK) + break; mask[current].assign(start_pos, curr); current = IDENT; start_pos = curr+1; break; case '@': + if (current != IDENT) + break; mask[current].assign(start_pos, curr); current = HOST; start_pos = curr+1; break; case '#': - /* bug #921: don't barf when redirecting to ## channels */ - if (current != CHAN) - { - mask[current].assign(start_pos, curr); - current = CHAN; - start_pos = curr; - } + if (current == CHAN) + break; + mask[current].assign(start_pos, curr); + current = CHAN; + start_pos = curr; break; } } |