X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.cpp;h=5fad2eb549015ff8daf0d847f23929d97df4e593;hp=577270d6942b675a4bb0d15c2f870ce3239df085;hb=d6b056e936ec441258d291b7a8af7b83f9f53016;hpb=eaa92c3648f551569e504971ebc75021a7e3e720 diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 577270d6..5fad2eb5 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel Team * + * Copyright (C) 2005-07 by the Quassel IRC Team * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -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); @@ -207,9 +209,9 @@ void IrcChannel::initSetUserModes(const QVariantMap &usermodes) { void IrcChannel::ircUserDestroyed() { IrcUser *ircUser = static_cast(sender()); Q_ASSERT(ircUser); - emit ircUserParted(ircUser); - emit ircUserDestroyed(ircUser); _userModes.remove(ircUser); + emit ircUserParted(ircUser); + qDebug() << "DEST" << name() << ircUsers().count(); } void IrcChannel::ircUserNickSet(QString nick) {