X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fircuser.cpp;h=223a02f5c40943f4f3ea463c071210c2acb53aff;hb=9f5481c93c3676f765333d4d9c36c559a339f3aa;hp=e8ccc370b09f27977a08c11bd6354416f127b240;hpb=2d19986a8bafafec55b5d3b0474f7d76eb5f33b2;p=quassel.git diff --git a/src/common/ircuser.cpp b/src/common/ircuser.cpp index e8ccc370..223a02f5 100644 --- a/src/common/ircuser.cpp +++ b/src/common/ircuser.cpp @@ -40,6 +40,7 @@ IrcUser::IrcUser(const QString &hostmask, Network *network) _server(), _idleTime(QDateTime::currentDateTime()), _ircOperator(), + _lastAwayMessage(0), _network(network), _codecForEncoding(0), _codecForDecoding(0) @@ -48,7 +49,6 @@ IrcUser::IrcUser(const QString &hostmask, Network *network) } IrcUser::~IrcUser() { - //qDebug() << nick() << "destroyed."; } // ==================== @@ -95,6 +95,10 @@ QString IrcUser::ircOperator() const { return _ircOperator; } +int IrcUser::lastAwayMessage() const { + return _lastAwayMessage; +} + QString IrcUser::userModes() const { return _userModes; } @@ -200,6 +204,13 @@ void IrcUser::setIrcOperator(const QString &ircOperator) { } } +void IrcUser::setLastAwayMessage(const int &lastAwayMessage) { + if(lastAwayMessage > _lastAwayMessage) { + _lastAwayMessage = lastAwayMessage; + emit lastAwayMessageSet(lastAwayMessage); + } +} + void IrcUser::setHost(const QString &host) { if(!host.isEmpty() && _host != host) { _host = host; @@ -269,10 +280,8 @@ void IrcUser::partChannel(const QString &channelname) { void IrcUser::channelDestroyed() { // private slot! IrcChannel *channel = static_cast(sender()); - Q_ASSERT(channel); if(_channels.contains(channel)) { _channels.remove(channel); - disconnect(channel, 0, this, 0); } }