Feature #7756: Allow server to supply a reason to kicked/banned clients
This commit adds the missing feature of allowing the server owner to provide a reason for kicking/banning a client, which the client sees in a pop-up window after being kicked. The implementation extends the network protocol by adding a new network action called NETWORK_ACTION_KICKED that is capable of having an error string, unlike the other network error packages. Additionally, the kick function broadcasts a message to all clients about the kicked client and the reason for the kick.
This commit is contained in:

committed by
Charles Pigott

parent
b5d56559d2
commit
5880f1479f
@@ -2168,6 +2168,7 @@ STR_NETWORK_ERROR_WRONG_PASSWORD :{WHITE}Wrong pa
|
||||
STR_NETWORK_ERROR_SERVER_FULL :{WHITE}The server is full
|
||||
STR_NETWORK_ERROR_SERVER_BANNED :{WHITE}You are banned from this server
|
||||
STR_NETWORK_ERROR_KICKED :{WHITE}You were kicked out of the game
|
||||
STR_NETWORK_ERROR_KICK_MESSAGE :{WHITE}Reason: {RAW_STRING}
|
||||
STR_NETWORK_ERROR_CHEATER :{WHITE}Cheating is not allowed on this server
|
||||
STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}You were sending too many commands to the server
|
||||
STR_NETWORK_ERROR_TIMEOUT_PASSWORD :{WHITE}You took too long to enter the password
|
||||
@@ -2227,6 +2228,7 @@ STR_NETWORK_MESSAGE_GIVE_MONEY :*** {RAW_STRING
|
||||
STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** You gave {1:RAW_STRING} {2:CURRENCY_LONG}
|
||||
STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}The server closed the session
|
||||
STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}The server is restarting...{}Please wait...
|
||||
STR_NETWORK_MESSAGE_KICKED :*** {RAW_STRING} was kicked. Reason: ({RAW_STRING})
|
||||
|
||||
# Content downloading window
|
||||
STR_CONTENT_TITLE :{WHITE}Content downloading
|
||||
|
Reference in New Issue
Block a user