From aae0f30aee91bd7eac229e5746892735e65a5d20 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Sun, 2 Jun 2013 14:10:24 -0700 Subject: m_banredirect Accept channel names starting with #! and #@ Fixes #504 reported by @mechasr --- src/modules/m_banredirect.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3