mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-05 05:42:42 +00:00
(svn r14588) -Fix [FS#2414]: the range for kicking/banning clients is based on the maximum number of clients, not the maximum number of companies.
This commit is contained in:
parent
2ed0c72ec5
commit
798fa3ec81
@ -1416,9 +1416,10 @@ static const NetworkClientInfo *NetworkFindClientInfo(byte client_no)
|
|||||||
// Here we start to define the options out of the menu
|
// Here we start to define the options out of the menu
|
||||||
static void ClientList_Kick(byte client_no)
|
static void ClientList_Kick(byte client_no)
|
||||||
{
|
{
|
||||||
if (client_no < MAX_COMPANIES)
|
if (client_no < MAX_CLIENTS) {
|
||||||
SEND_COMMAND(PACKET_SERVER_ERROR)(DEREF_CLIENT(client_no), NETWORK_ERROR_KICKED);
|
SEND_COMMAND(PACKET_SERVER_ERROR)(DEREF_CLIENT(client_no), NETWORK_ERROR_KICKED);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void ClientList_Ban(byte client_no)
|
static void ClientList_Ban(byte client_no)
|
||||||
{
|
{
|
||||||
@ -1431,7 +1432,7 @@ static void ClientList_Ban(byte client_no)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client_no < MAX_COMPANIES) {
|
if (client_no < MAX_CLIENTS) {
|
||||||
SEND_COMMAND(PACKET_SERVER_ERROR)(DEREF_CLIENT(client_no), NETWORK_ERROR_KICKED);
|
SEND_COMMAND(PACKET_SERVER_ERROR)(DEREF_CLIENT(client_no), NETWORK_ERROR_KICKED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user