Skip to content

Commit 2b1ed15

Browse files
committed
Add registration token
1 parent 70df0de commit 2b1ed15

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/serverlist.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ CServerListEntry::CServerListEntry ( const CHostAddress& NHAddr, const CHostAddr
8686
NewCoreServerInfo.eCountry,
8787
NewCoreServerInfo.strCity,
8888
NewCoreServerInfo.iMaxNumClients,
89-
NewCoreServerInfo.bPermanentOnline )
89+
NewCoreServerInfo.bPermanentOnline ),
90+
token ( QRandomGenerator::system()->generate() )
9091
{
9192
UpdateRegistration();
9293
}

src/serverlist.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Note: this mechanism will not work in a private network.
8989
#include <QLocale>
9090
#include <QList>
9191
#include <QElapsedTimer>
92+
#include <QRandomGenerator>
9293
#include <QMutex>
9394
#if QT_VERSION >= QT_VERSION_CHECK( 5, 6, 0 )
9495
# include <QVersionNumber>
@@ -128,6 +129,8 @@ class CServerListEntry : public CServerInfo
128129
static QString ToBase64 ( const QString strIn ) { return ToBase64 ( strIn.toUtf8() ); }
129130
static QByteArray FromBase64ToByteArray ( const QString strIn ) { return QByteArray::fromBase64 ( strIn.toLatin1() ); }
130131
static QString FromBase64ToString ( const QString strIn ) { return QString::fromUtf8 ( FromBase64ToByteArray ( strIn ) ); }
132+
133+
quint32 token;
131134
};
132135

133136
class CServerListManager : public QObject

0 commit comments

Comments
 (0)