Send a different error if a user is permanently blocked.
This commit is contained in:
@@ -761,6 +761,11 @@ void startWindowImpl::networkError(int errorID, int /*osErrorID*/) {
|
||||
tr("You were temporarily banned from the server."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_PLAYER_BLOCKED:
|
||||
{ mySession->terminateNetworkClient();
|
||||
QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Your account is blocked indefinitely."),
|
||||
QMessageBox::Close); }
|
||||
case ERR_NET_SESSION_TIMED_OUT:
|
||||
{ mySession->terminateNetworkClient();
|
||||
QMessageBox::warning(this, tr("Network Error"),
|
||||
|
||||
@@ -222,6 +222,9 @@ NetPacket::NetErrorToGameError(long netErrorReason)
|
||||
case errorReason_errorBannedFromServer :
|
||||
retVal = ERR_NET_PLAYER_BANNED;
|
||||
break;
|
||||
case errorReason_errorBlockedByServer :
|
||||
retVal = ERR_NET_PLAYER_BLOCKED;
|
||||
break;
|
||||
case errorReason_errorSessionTimeout :
|
||||
retVal = ERR_NET_SESSION_TIMED_OUT;
|
||||
break;
|
||||
@@ -271,6 +274,9 @@ NetPacket::GameErrorToNetError(int gameErrorReason)
|
||||
case ERR_NET_PLAYER_KICKED :
|
||||
retVal = errorReason_errorKickedFromServer;
|
||||
break;
|
||||
case ERR_NET_PLAYER_BLOCKED :
|
||||
retVal = errorReason_errorBlockedByServer;
|
||||
break;
|
||||
case ERR_NET_PLAYER_BANNED :
|
||||
retVal = errorReason_errorBannedFromServer;
|
||||
break;
|
||||
|
||||
+17
-16
@@ -71,22 +71,23 @@
|
||||
#define ERR_NET_PLAYER_NOT_ACTIVE 117
|
||||
#define ERR_NET_PLAYER_KICKED 118
|
||||
#define ERR_NET_PLAYER_BANNED 119
|
||||
#define ERR_NET_SESSION_TIMED_OUT 120
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 121
|
||||
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 122
|
||||
#define ERR_NET_INVALID_AVATAR_FILE 123
|
||||
#define ERR_NET_AVATAR_TOO_LARGE 124
|
||||
#define ERR_NET_BUF_INVALID_SIZE 125
|
||||
#define ERR_NET_INVALID_REQUEST_ID 126
|
||||
#define ERR_NET_WRONG_AVATAR_SIZE 127
|
||||
#define ERR_NET_START_TIMEOUT 128
|
||||
#define ERR_NET_GAME_TERMINATION_FAILED 129
|
||||
#define ERR_NET_INTERNAL_GAME_ERROR 130
|
||||
#define ERR_NET_DEALER_NOT_FOUND 131
|
||||
#define ERR_NET_INIT_BLOCKED 132
|
||||
#define ERR_NET_GSASL_INIT_FAILED 133
|
||||
#define ERR_NET_GSASL_NO_SCRAM 134
|
||||
#define ERR_NET_DB_CONNECT_FAILED 135
|
||||
#define ERR_NET_PLAYER_BLOCKED 120
|
||||
#define ERR_NET_SESSION_TIMED_OUT 121
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 122
|
||||
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 123
|
||||
#define ERR_NET_INVALID_AVATAR_FILE 124
|
||||
#define ERR_NET_AVATAR_TOO_LARGE 125
|
||||
#define ERR_NET_BUF_INVALID_SIZE 126
|
||||
#define ERR_NET_INVALID_REQUEST_ID 127
|
||||
#define ERR_NET_WRONG_AVATAR_SIZE 128
|
||||
#define ERR_NET_START_TIMEOUT 129
|
||||
#define ERR_NET_GAME_TERMINATION_FAILED 130
|
||||
#define ERR_NET_INTERNAL_GAME_ERROR 131
|
||||
#define ERR_NET_DEALER_NOT_FOUND 132
|
||||
#define ERR_NET_INIT_BLOCKED 133
|
||||
#define ERR_NET_GSASL_INIT_FAILED 134
|
||||
#define ERR_NET_GSASL_NO_SCRAM 135
|
||||
#define ERR_NET_DB_CONNECT_FAILED 136
|
||||
|
||||
#define ERR_IRC_INTERNAL 151
|
||||
#define ERR_IRC_CONNECT_FAILED 152
|
||||
|
||||
Vendored
+5
-3
@@ -96,11 +96,13 @@ static asn_INTEGER_enum_map_t asn_MAP_errorReason_value2enum_2[] = {
|
||||
{ 257, 17, "errorInvalidState" },
|
||||
{ 258, 21, "errorKickedFromServer" },
|
||||
{ 259, 21, "errorBannedFromServer" },
|
||||
{ 260, 19, "errorSessionTimeout" }
|
||||
{ 260, 20, "errorBlockedByServer" },
|
||||
{ 261, 19, "errorSessionTimeout" }
|
||||
};
|
||||
static unsigned int asn_MAP_errorReason_enum2value_2[] = {
|
||||
8, /* errorAvatarTooLarge(8) */
|
||||
12, /* errorBannedFromServer(259) */
|
||||
13, /* errorBlockedByServer(260) */
|
||||
3, /* errorInitAuthFailure(3) */
|
||||
7, /* errorInitBlocked(7) */
|
||||
5, /* errorInitInvalidPlayerName(5) */
|
||||
@@ -112,12 +114,12 @@ static unsigned int asn_MAP_errorReason_enum2value_2[] = {
|
||||
10, /* errorInvalidState(257) */
|
||||
11, /* errorKickedFromServer(258) */
|
||||
0, /* errorReserved(0) */
|
||||
13 /* errorSessionTimeout(260) */
|
||||
14 /* errorSessionTimeout(261) */
|
||||
};
|
||||
static asn_INTEGER_specifics_t asn_SPC_errorReason_specs_2 = {
|
||||
asn_MAP_errorReason_value2enum_2, /* "tag" => N; sorted by tag */
|
||||
asn_MAP_errorReason_enum2value_2, /* N => "tag"; sorted by N */
|
||||
14, /* Number of elements in the maps */
|
||||
15, /* Number of elements in the maps */
|
||||
0, /* Enumeration is not extensible */
|
||||
1, /* Strict enumeration */
|
||||
0, /* Native long size */
|
||||
|
||||
Vendored
+2
-1
@@ -34,7 +34,8 @@ typedef enum errorReason {
|
||||
errorReason_errorInvalidState = 257,
|
||||
errorReason_errorKickedFromServer = 258,
|
||||
errorReason_errorBannedFromServer = 259,
|
||||
errorReason_errorSessionTimeout = 260
|
||||
errorReason_errorBlockedByServer = 260,
|
||||
errorReason_errorSessionTimeout = 261
|
||||
} e_errorReason;
|
||||
|
||||
/* ErrorMessage */
|
||||
|
||||
Reference in New Issue
Block a user