Files
chatterino2/src/twitch/twitchuser.hpp
Rasmus Karlsson 556dbe0456 Fix whisper receiving
Added setting to display them inline under "Special Channels" page

Store a twitch users color in the TwitchUser struct
this is useful if we ever want to use the users own color.
The users own color is only updated once he has written once in chat

Add helper method for calling function only on normal channels

Fixes #54
2018-02-04 16:33:46 +01:00

42 lines
964 B
C++

#pragma once
#include "ircaccount.hpp"
#include <QColor>
#include <QString>
namespace chatterino {
namespace twitch {
class TwitchUser : public IrcUser2
{
public:
TwitchUser(const QString &username, const QString &oauthToken, const QString &oauthClient);
const QString &getOAuthToken() const;
const QString &getOAuthClient() const;
const QString &getUserId() const;
void setUserId(const QString &id);
// Attempts to update the users OAuth Client ID
// Returns true if the value has changed, otherwise false
bool setOAuthClient(const QString &newClientID);
// Attempts to update the users OAuth Token
// Returns true if the value has changed, otherwise false
bool setOAuthToken(const QString &newOAuthToken);
bool isAnon() const;
QColor color;
private:
QString _oauthClient;
QString _oauthToken;
QString _userId;
const bool _isAnon;
};
} // namespace twitch
} // namespace chatterino