summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_banredirect.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index cf6c27828..e2346b1d3 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -86,9 +86,13 @@ class BanRedirect : public ModeWatcher
start_pos = curr+1;
break;
case '#':
- mask[current].assign(start_pos, curr);
- current = CHAN;
- start_pos = curr;
+ /* bug #921: don't barf when redirecting to ## channels */
+ if (current != CHAN)
+ {
+ mask[current].assign(start_pos, curr);
+ current = CHAN;
+ start_pos = curr;
+ }
break;
}
}