Added error code and message for server maintenance.

This commit is contained in:
lotodore
2007-10-12 15:35:58 +00:00
parent 6cf0d8777a
commit b833b05787
4 changed files with 36 additions and 22 deletions
+1
View File
@@ -826,6 +826,7 @@ Error Reason:
0x0004 - Init - Invalid Password
0x0005 - Init - Player Name already in use
0x0006 - Init - Invalid Player Name
0x0007 - Init - Server Maintenance
0x0010 - Avatar - Too large
0x0011 - Avatar - Wrong size
0x0020 - Join Game - Unknown Game
+5
View File
@@ -3548,6 +3548,11 @@ void mainWindowImpl::networkError(int errorID, int /*osErrorID*/) {
tr("Could not start game: Synchronization failed."),
QMessageBox::Close); }
break;
case ERR_NET_SERVER_MAINTENANCE:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The server is down for maintenance. Please try again later."),
QMessageBox::Close); }
break;
default: { QMessageBox::warning(this, tr("Network Error"),
tr("An internal error occured."),
QMessageBox::Close); }
+7
View File
@@ -103,6 +103,7 @@ using namespace std;
#define NET_ERR_INIT_INVALID_PASSWORD 0x0004
#define NET_ERR_INIT_PLAYER_NAME_IN_USE 0x0005
#define NET_ERR_INIT_INVALID_PLAYER_NAME 0x0006
#define NET_ERR_INIT_SERVER_MAINTENANCE 0x0007
#define NET_ERR_AVATAR_TOO_LARGE 0x0010
#define NET_ERR_AVATAR_WRONG_SIZE 0x0011
#define NET_ERR_JOIN_GAME_UNKNOWN_GAME 0x0020
@@ -4347,6 +4348,9 @@ NetPacketError::SetData(const NetPacketError::Data &inData)
case ERR_NET_INVALID_PLAYER_NAME :
tmpData->errorReason = htons(NET_ERR_INIT_INVALID_PLAYER_NAME);
break;
case ERR_NET_SERVER_MAINTENANCE :
tmpData->errorReason = htons(NET_ERR_INIT_SERVER_MAINTENANCE);
break;
case ERR_NET_AVATAR_TOO_LARGE :
tmpData->errorReason = htons(NET_ERR_AVATAR_TOO_LARGE);
break;
@@ -4399,6 +4403,9 @@ NetPacketError::GetData(NetPacketError::Data &outData) const
case NET_ERR_INIT_INVALID_PLAYER_NAME :
outData.errorCode = ERR_NET_INVALID_PLAYER_NAME;
break;
case NET_ERR_INIT_SERVER_MAINTENANCE :
outData.errorCode = ERR_NET_SERVER_MAINTENANCE;
break;
case NET_ERR_AVATAR_TOO_LARGE :
outData.errorCode = ERR_NET_AVATAR_TOO_LARGE;
break;
+23 -22
View File
@@ -43,28 +43,29 @@
#define ERR_SOCK_INVALID_TYPE 20
// The following errors are game errors.
#define ERR_NET_VERSION_NOT_SUPPORTED 101
#define ERR_NET_SERVER_FULL 102
#define ERR_NET_INVALID_PASSWORD 103
#define ERR_NET_INVALID_PASSWORD_STR 104
#define ERR_NET_PLAYER_NAME_IN_USE 105
#define ERR_NET_INVALID_PLAYER_NAME 106
#define ERR_NET_INVALID_PLAYER_CARDS 107
#define ERR_NET_INVALID_PLAYER_RESULTS 108
#define ERR_NET_INVALID_GAME_NAME 109
#define ERR_NET_UNKNOWN_GAME 110
#define ERR_NET_INVALID_CHAT_TEXT 111
#define ERR_NET_UNKNOWN_PLAYER_ID 112
#define ERR_NET_NO_CURRENT_PLAYER 113
#define ERR_NET_PLAYER_NOT_ACTIVE 114
#define ERR_NET_PLAYER_KICKED 117
#define ERR_NET_INVALID_PLAYER_COUNT 118
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 119
#define ERR_NET_INVALID_AVATAR_FILE 120
#define ERR_NET_AVATAR_TOO_LARGE 121
#define ERR_NET_BUF_INVALID_SIZE 122
#define ERR_NET_INVALID_REQUEST_ID 123
#define ERR_NET_WRONG_AVATAR_SIZE 124
#define ERR_NET_START_TIMEOUT 125
#define ERR_NET_SERVER_MAINTENANCE 102
#define ERR_NET_SERVER_FULL 103
#define ERR_NET_INVALID_PASSWORD 104
#define ERR_NET_INVALID_PASSWORD_STR 105
#define ERR_NET_PLAYER_NAME_IN_USE 106
#define ERR_NET_INVALID_PLAYER_NAME 107
#define ERR_NET_INVALID_PLAYER_CARDS 108
#define ERR_NET_INVALID_PLAYER_RESULTS 109
#define ERR_NET_INVALID_GAME_NAME 110
#define ERR_NET_UNKNOWN_GAME 111
#define ERR_NET_INVALID_CHAT_TEXT 112
#define ERR_NET_UNKNOWN_PLAYER_ID 113
#define ERR_NET_NO_CURRENT_PLAYER 114
#define ERR_NET_PLAYER_NOT_ACTIVE 115
#define ERR_NET_PLAYER_KICKED 116
#define ERR_NET_INVALID_PLAYER_COUNT 117
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 118
#define ERR_NET_INVALID_AVATAR_FILE 119
#define ERR_NET_AVATAR_TOO_LARGE 120
#define ERR_NET_BUF_INVALID_SIZE 121
#define ERR_NET_INVALID_REQUEST_ID 122
#define ERR_NET_WRONG_AVATAR_SIZE 123
#define ERR_NET_START_TIMEOUT 124
#define ERR_IRC_INTERNAL 151
#define ERR_IRC_CONNECT_FAILED 152