X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircuser.h;h=4aa2bf5c993ebab8a8e6672f314b5f861c1f3c6f;hp=c33a3b2d5384fe342c94ef4f0df3a075f33bbdc0;hb=0dbec2cfc937857d66a9645249f876f1e6b3f05e;hpb=8cece06596c290d69c1f32b7221c796437f5fabb diff --git a/src/common/ircuser.h b/src/common/ircuser.h index c33a3b2d..4aa2bf5c 100644 --- a/src/common/ircuser.h +++ b/src/common/ircuser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,6 +43,7 @@ class IrcUser : public SyncableObject Q_PROPERTY(QString host READ host WRITE setHost) Q_PROPERTY(QString nick READ nick WRITE setNick) Q_PROPERTY(QString realName READ realName WRITE setRealName) + Q_PROPERTY(QString account READ account WRITE setAccount) Q_PROPERTY(bool away READ isAway WRITE setAway) Q_PROPERTY(QString awayMessage READ awayMessage WRITE setAwayMessage) Q_PROPERTY(QDateTime idleTime READ idleTime WRITE setIdleTime) @@ -65,6 +66,12 @@ public : inline QString host() const { return _host; } inline QString nick() const { return _nick; } inline QString realName() const { return _realName; } + /** + * Account name, e.g. NickServ/SASL account + * + * @return Account name if logged in, * if logged out, or empty string if unknown + */ + inline QString account() const { return _account; } QString hostmask() const; inline bool isAway() const { return _away; } inline QString awayMessage() const { return _awayMessage; } @@ -104,6 +111,12 @@ public slots: void setHost(const QString &host); void setNick(const QString &nick); void setRealName(const QString &realName); + /** + * Set account name, e.g. NickServ/SASL account + * + * @param[in] account Account name if logged in, * if logged out, or empty string if unknown + */ + void setAccount(const QString &account); void setAway(const bool &away); void setAwayMessage(const QString &awayMessage); void setIdleTime(const QDateTime &idleTime); @@ -182,6 +195,7 @@ private: QString _user; QString _host; QString _realName; + QString _account; /// Account name, e.g. NickServ/SASL account QString _awayMessage; bool _away; QString _server;