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/network/network_type.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/network/network_type.h') diff --git a/src/network/network_type.h b/src/network/network_type.h index 595eaad0f..5f796b83d 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -85,6 +85,7 @@ enum DestType { enum NetworkAction { NETWORK_ACTION_JOIN, NETWORK_ACTION_LEAVE, + NETWORK_ACTION_KICKED, NETWORK_ACTION_SERVER_MESSAGE, NETWORK_ACTION_CHAT, NETWORK_ACTION_CHAT_COMPANY, -- cgit v1.2.3-54-g00ecf