summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-09-26 21:07:24 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-09-26 21:07:24 +0200
commit4343bbb67aea2c2a23844bca1dab6488cd1402f1 (patch)
tree1e278d9b64e346f556b43ffb6bd51e1418a818be
parentaa5a97bfd618d26fe5c082d57557cea20cbe342d (diff)
Reject parameters that begin with a colon in Channel::SetDefaultModes()
-rw-r--r--src/channels.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 9eee987f1..9f1eafd0c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -202,7 +202,12 @@ void Channel::SetDefaultModes()
if (mode)
{
if (mode->GetNumParams(true))
+ {
list.GetToken(parameter);
+ // If the parameter begins with a ':' then it's invalid
+ if (parameter.c_str()[0] == ':')
+ continue;
+ }
else
parameter.clear();