X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.cpp;h=a5d5c822bb415593900a5a3fb6421cce189904f1;hp=53e495a089bb05676c8bfa025217391a7818cc1a;hb=b06a827aea68b050bf23c37e0162189a94595ee9;hpb=d6dd4ff24cade95ed49570786c8b81f10c6bddce diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 53e495a0..a5d5c822 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -178,12 +178,20 @@ void IrcChannel::joinIrcUsers(const QList &users, const QStringList & for (int i = 0; i < users.count(); i++) { ircuser = users[i]; if (!ircuser || _userModes.contains(ircuser)) { - addUserMode(ircuser, modes[i]); + if (modes[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 < modes[i].count(); ++i_m) { + addUserMode(ircuser, modes[i][i_m]); + } + } else { + addUserMode(ircuser, modes[i]); + } continue; } _userModes[ircuser] = modes[i]; - ircuser->joinChannel(this); + ircuser->joinChannel(this, true); connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickSet(QString))); // connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));