X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.cpp;h=499e1f75a308ba12a461fd3dfbfd36d03b5754bd;hp=c669d1f0fc400a45a12e37626b9b9507c18ef403;hb=1cad7d10240a398c11af0043720d675e631f016f;hpb=e671e9da1edaab37ec403f575979f9a92a766e9a diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index c669d1f0..499e1f75 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -56,7 +56,7 @@ bool IrcChannel::isKnownUser(IrcUser *ircuser) const { isknown = false; } - if(!_userModes.contains(ircuser) && ircuser) { + if(!_userModes.contains(ircuser)) { qWarning() << "Channel" << name() << "received data for unknown User" << ircuser->nick(); isknown = false; } @@ -112,6 +112,7 @@ void IrcChannel::join(IrcUser *ircuser) { if(!_userModes.contains(ircuser) && ircuser) { _userModes[ircuser] = QString(); ircuser->joinChannel(name()); + qDebug() << "JOIN" << name() << ircuser->nick() << ircUsers().count(); connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickSet(QString))); connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed())); // if you wonder why there is no counterpart to ircUserJoined: @@ -128,6 +129,7 @@ void IrcChannel::part(IrcUser *ircuser) { if(isKnownUser(ircuser)) { _userModes.remove(ircuser); ircuser->partChannel(name()); + qDebug() << "PART" << name() << ircuser->nick() << ircUsers().count(); // if you wonder why there is no counterpart to ircUserParted: // the joines are propagted by the ircuser. the signal ircUserParted is only for convenience emit ircUserParted(ircuser); @@ -208,6 +210,8 @@ void IrcChannel::ircUserDestroyed() { IrcUser *ircUser = static_cast(sender()); Q_ASSERT(ircUser); _userModes.remove(ircUser); + emit ircUserParted(ircUser); + qDebug() << "DEST" << name() << ircUsers().count(); } void IrcChannel::ircUserNickSet(QString nick) {