X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.cpp;h=0587697cfb7a729719bf85090858bb122dbd4a2b;hb=cab361607b686847ee0df2e605f8f05598b65f99;hp=e6c809f0cb43b5912ad76b5419739f2471edaa24;hpb=e733408e4759473bf38831f498f48a0f2f5e6dc7;p=quassel.git diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index e6c809f0..0587697c 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -44,7 +44,6 @@ IrcChannel::IrcChannel(const QString &channelname, Network *network) } IrcChannel::~IrcChannel() { - } // ==================== @@ -143,7 +142,7 @@ void IrcChannel::setTopic(const QString &topic) { void IrcChannel::join(IrcUser *ircuser) { if(!_userModes.contains(ircuser) && ircuser) { _userModes[ircuser] = QString(); - ircuser->joinChannel(name()); + ircuser->joinChannel(this); //qDebug() << "JOIN" << name() << ircuser->nick() << ircUsers().count(); connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickSet(QString))); connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed())); @@ -160,10 +159,11 @@ void IrcChannel::join(const QString &nick) { void IrcChannel::part(IrcUser *ircuser) { if(isKnownUser(ircuser)) { _userModes.remove(ircuser); - ircuser->partChannel(name()); + ircuser->partChannel(this); //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 + disconnect(ircuser, 0, this, 0); emit ircUserParted(ircuser); if(network->isMe(ircuser)) deleteLater(); @@ -244,8 +244,8 @@ void IrcChannel::ircUserDestroyed() { IrcUser *ircUser = static_cast(sender()); Q_ASSERT(ircUser); _userModes.remove(ircUser); - emit ircUserParted(ircUser); - //qDebug() << "DEST" << name() << ircUsers().count(); + // no further propagation. + // this leads only to fuck ups. } void IrcChannel::ircUserNickSet(QString nick) {