- if (!ircuser || _userModes.contains(ircuser)) {
- addUserMode(ircuser, modes[i]);
+ if (!ircuser)
+ continue;
+ if (_userModes.contains(ircuser)) {
+ if (sortedModes[i].count() > 1) {
+ // Multiple modes received, do it one at a time
+ // TODO Better way of syncing this without breaking protocol?
+ for (int i_m = 0; i_m < sortedModes[i].count(); ++i_m) {
+ addUserMode(ircuser, sortedModes[i][i_m]);
+ }
+ } else {
+ addUserMode(ircuser, sortedModes[i]);
+ }