From 5880f1479f21157158dbe862e4cb1118e0cfbfae Mon Sep 17 00:00:00 2001 From: Bjarni Thor Date: Tue, 21 Jan 2020 15:39:10 +0000 Subject: 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. --- src/lang/english.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lang/english.txt') diff --git a/src/lang/english.txt b/src/lang/english.txt index 963fc3d28..2a4ab1c28 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -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 -- cgit v1.2.3-54-g00ecf