![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include "servatrice.h"#include "email_parser.h"#include "event_loop_watchdog.h"#include "isl_interface.h"#include "libcockatrice/protocol/pb/response_report_stats.pb.h"#include "libcockatrice/protocol/pb/session_event.pb.h"#include "main.h"#include "servatrice_connection_pool.h"#include "servatrice_database_interface.h"#include "server.h"#include "server_logger.h"#include "server_protocolhandler.h"#include "serversocketinterface.h"#include "settingscache.h"#include "smtpclient.h"#include "trusted_sources.h"#include <QDateTime>#include <QDebug>#include <QFile>#include <QIODevice>#include <QLoggingCategory>#include <QMapIterator>#include <QMetaObject>#include <QMutableListIterator>#include <QObject>#include <QProcessEnvironment>#include <QReadLocker>#include <QRegularExpression>#include <QSet>#include <QSharedPointer>#include <QSqlDatabase>#include <QSqlQuery>#include <QSsl>#include <QString>#include <QStringList>#include <QStringLiteral>#include <QThread>#include <QTimer>#include <QTypeInfo>#include <QUrl>#include <QVariant>#include <QtGlobal>#include <compare>#include <game/server_game.h>#include <google/protobuf/stubs/port.h>#include <libcockatrice/protocol/featureset.h>#include <libcockatrice/protocol/pb/event_connection_closed.pb.h>#include <libcockatrice/protocol/pb/event_server_message.pb.h>#include <libcockatrice/protocol/pb/event_server_shutdown.pb.h>#include <libcockatrice/protocol/pb/serverinfo_room_channel.pb.h>#include <new>#include <optional>#include <qlogging.h>#include <qnamespace.h>#include <server_room.h>#include <string>Macros | |
| #define | WEBSOCKET_POOL_NUMBER 999 |
Functions | |
| Q_LOGGING_CATEGORY (ServatriceLog, "servatrice") | |
| static std::optional< ServerInfo_RoomChannel::AccessLevel > | roomChannelAccessFromKey (const QString &key) |
| Maps a configured channel access level (database column or ini value) onto the ServerInfo_RoomChannel privilege ladder. | |
| static QString | loginLimitKey (const QString &ipAddress, const QString &userName) |
| Rate limiter key for one login target. | |
Variables | |
| static constexpr qint64 | kLegacyBackupSweepIntervalMs = 6 * 60 * 60 * 1000 |
| #define WEBSOCKET_POOL_NUMBER 999 |
|
static |
Rate limiter key for one login target.
Keyed by (address, username) so a success only clears that pair's history: a guest login or a login as the attacker's own account from the same address must not wipe out another user's failure count. Lowercased so case variations of the same name share one bucket.
|
inline |
|
static |
Maps a configured channel access level (database column or ini value) onto the ServerInfo_RoomChannel privilege ladder.
Returns nullopt for unknown keywords so callers can fail closed instead of silently downgrading a restricted channel to Public.
|
staticconstexpr |