mirror of
https://github.com/anope/anope.git
synced 2026-06-25 07:16:39 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user