diff options
author | genius3000 <genius3000@g3k.solutions> | 2018-02-13 20:35:37 -0700 |
---|---|---|
committer | genius3000 <genius3000@g3k.solutions> | 2018-02-13 20:35:37 -0700 |
commit | ff878bbda86acfe2adfe3fec7caa43fc48646faf (patch) | |
tree | fc18ae8b2d717d1e97e018e97e178a4558b3859c /modules/protocol/inspircd20.cpp | |
parent | 1baf774647f138a080b38aab6beeb8626f32abed (diff) |
Allow empty values in InspIRCd 2.0 mode strings within CAPABILITIES
Skipping over empty values in the commasepstream can put the mode adding
logic out of order (eg. ignoring the first two tokens when they are the
needed tokens). Most modes are already added by being explicitly checked
for, but the "unknown" or "extra" modes are added here.
Diffstat (limited to 'modules/protocol/inspircd20.cpp')
-rw-r--r-- | modules/protocol/inspircd20.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index ab7649b69..1b05ebf5c 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -651,7 +651,7 @@ struct IRCDMessageCapab : Message::Capab if (capab.find("CHANMODES") != Anope::string::npos) { Anope::string modes(capab.begin() + 10, capab.end()); - commasepstream sep(modes); + commasepstream sep(modes, true); Anope::string modebuf; sep.GetToken(modebuf); @@ -689,7 +689,7 @@ struct IRCDMessageCapab : Message::Capab else if (capab.find("USERMODES") != Anope::string::npos) { Anope::string modes(capab.begin() + 10, capab.end()); - commasepstream sep(modes); + commasepstream sep(modes, true); Anope::string modebuf; sep.GetToken(modebuf); |