MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / NetworkServerKickOrBanIP

Function NetworkServerKickOrBanIP

src/network/network_server.cpp:2041–2044  ·  view source on GitHub ↗

* Ban, or kick, everyone joined from the given client's IP. * @param client_id The client to check for. * @param ban Whether to ban or kick. * @param reason In case of kicking a client, specifies the reason for kicking the client. */

Source from the content-addressed store, hash-verified

2039 * @param reason In case of kicking a client, specifies the reason for kicking the client.
2040 */
2041uint NetworkServerKickOrBanIP(ClientID client_id, bool ban, std::string_view reason)
2042{
2043 return NetworkServerKickOrBanIP(NetworkClientSocket::GetByClientID(client_id)->GetClientIP(), ban, reason);
2044}
2045
2046/**
2047 * Kick or ban someone based on an IP address.

Callers 2

ConKickOrBanFunction · 0.85
AdminClientBanCallbackFunction · 0.85

Calls 3

NetworkServerKickClientFunction · 0.85
GetClientIPMethod · 0.80
IsInNetmaskMethod · 0.80

Tested by

no test coverage detected