+
+ if(network->isMe(ircuser) || _userModes.isEmpty()) {
+ // in either case we're no longer in the channel
+ // -> clean up the channel and destroy it
+ QList<IrcUser *> users = _userModes.keys();
+ _userModes.clear();
+ foreach(IrcUser *user, users) {
+ disconnect(user, 0, this, 0);
+ user->partChannel(this);
+ }
+ emit parted();
+ network->removeIrcChannel(this);
+ }