X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.cpp;h=edb2c710a1dfc104c727d3d2d20671c983a60411;hp=1e567b5c70fe94672ad8de68c9cdfa75f8fa3a3e;hb=4aca5963302eb2f6dfc41b723df4b362704f1b2b;hpb=50706d89d4d60e258ebb6873d3778383621898e4 diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 1e567b5c..edb2c710 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -40,11 +40,10 @@ IrcChannel::IrcChannel(const QString &channelname, Network *network) _topic(QString()), network(network) { - setObjectName(QString::number(network->networkId()) + "/" + channelname); + setObjectName(QString::number(network->networkId().toInt()) + "/" + channelname); } IrcChannel::~IrcChannel() { - } // ==================== @@ -73,10 +72,6 @@ bool IrcChannel::isValidChannelUserMode(const QString &mode) const { return isvalid; } -bool IrcChannel::initialized() const { - return _initialized; -} - QString IrcChannel::name() const { return _name; } @@ -147,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())); @@ -164,12 +159,13 @@ 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->isMyNick(ircuser)) + if(network->isMe(ircuser)) deleteLater(); } } @@ -258,8 +254,3 @@ void IrcChannel::ircUserNickSet(QString nick) { emit ircUserNickSet(ircUser, nick); } -void IrcChannel::setInitialized() { - _initialized = true; - emit initDone(); -} -