first commit

This commit is contained in:
2026-01-26 22:26:19 +03:00
commit 31fccd85f2
95 changed files with 115400 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
// TwitchMessage.h
#ifndef TWITCHMESSAGE_H
#define TWITCHMESSAGE_H
#include <QString>
#include <QDateTime>
#include <QMap>
struct TwitchMessage
{
// Tags (после @)
struct Badge {
QString name;
int version;
};
QList<Badge> badges;
QString badgeInfo;
QString clientNonce;
QString color;
QString displayName;
QString emotes;
bool firstMsg;
QString flags;
QString messageId;
bool isMod;
bool isVIP;
bool returningChatter;
qint64 roomId;
bool isSubscriber;
qint64 tmiSentTimestamp;
bool isTurbo;
qint64 userId;
QString userType;
// IRC parts
QString ircPrefix;
QString ircCommand;
QString channel;
QString message;
// Timestamp as QDateTime
QDateTime timestamp() const {
return QDateTime::fromMSecsSinceEpoch(tmiSentTimestamp);
}
// Constructor
TwitchMessage()
: firstMsg(false)
, isMod(false)
, isVIP(false)
, returningChatter(false)
, roomId(0)
, isSubscriber(false)
, tmiSentTimestamp(0)
, isTurbo(false)
, userId(0)
{}
// Parse from raw IRC message
static TwitchMessage parse(const QString &rawMessage);
};
#endif // TWITCHMESSAGE_H