X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircuser.cpp;h=4c12580d5f3b4702b79670042cc0daf913188e6e;hp=efa7541557dc327024e8653e9be1c02a68c9631c;hb=56607f81246f04db3a0e71c9a8757d7f75d6cfcf;hpb=ffa244c20cbaf74d50e27a9416d33ea8e08e2836 diff --git a/src/common/ircuser.cpp b/src/common/ircuser.cpp index efa75415..4c12580d 100644 --- a/src/common/ircuser.cpp +++ b/src/common/ircuser.cpp @@ -243,9 +243,8 @@ void IrcUser::joinChannel(IrcChannel *channel) { Q_ASSERT(channel); if(!_channels.contains(channel)) { _channels.insert(channel); - channel->join(this); + channel->joinIrcUsers(this); connect(channel, SIGNAL(destroyed()), this, SLOT(channelDestroyed())); - emit channelJoined(channel->name()); } } @@ -259,7 +258,7 @@ void IrcUser::partChannel(IrcChannel *channel) { disconnect(channel, 0, this, 0); channel->part(this); emit channelParted(channel->name()); - if(_channels.isEmpty()) + if(_channels.isEmpty() && network()->isMe(this)) deleteLater(); } } @@ -278,6 +277,8 @@ void IrcUser::channelDestroyed() { IrcChannel *channel = static_cast(sender()); if(_channels.contains(channel)) { _channels.remove(channel); + if(_channels.isEmpty()) + deleteLater(); } }