X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fircuser.cpp;h=94d404d5f1a30c4ecdcafca3ad3ad6e173bb929a;hb=3e800ec6553158aa0da3b08da78083d587389914;hp=d7b65f09a4bb330b5ab326328caa1c03a956770d;hpb=8bdfd0d16857c508f543298ad98f6262127f2886;p=quassel.git diff --git a/src/common/ircuser.cpp b/src/common/ircuser.cpp index d7b65f09..94d404d5 100644 --- a/src/common/ircuser.cpp +++ b/src/common/ircuser.cpp @@ -291,16 +291,16 @@ void IrcUser::joinChannel(const QString& channelname) joinChannel(network()->newIrcChannel(channelname)); } -void IrcUser::partChannel(IrcChannel* channel) +void IrcUser::partChannel(IrcChannel* channel, bool skip_sync) { if (_channels.contains(channel)) { _channels.remove(channel); disconnect(channel, nullptr, this, nullptr); channel->part(this); QString channelName = channel->name(); - SYNC_OTHER(partChannel, ARG(channelName)) + if (!skip_sync) SYNC_OTHER(partChannel, ARG(channelName)) if (_channels.isEmpty() && !network()->isMe(this)) - quit(); + quit(skip_sync); } } @@ -315,7 +315,7 @@ void IrcUser::partChannel(const QString& channelname) } } -void IrcUser::quit() +void IrcUser::quit(bool skip_sync) { QList channels = _channels.values(); _channels.clear(); @@ -324,7 +324,7 @@ void IrcUser::quit() channel->part(this); } network()->removeIrcUser(this); - SYNC(NO_ARG) + if (!skip_sync) SYNC(NO_ARG) emit quited(); }