1.1 --- a/plugins/include/clients.inc Sun Jul 06 00:02:11 2008 +0000
1.2 +++ b/plugins/include/clients.inc Sun Jul 06 00:45:26 2008 +0000
1.3 @@ -634,7 +634,28 @@
1.4 native GetClientOfUserId(userid);
1.5
1.6 /**
1.7 - * Disconnects a client from the server.
1.8 + * Disconnects a client from the server as soon as the next frame starts.
1.9 + *
1.10 + * Note: Originally, KickClient() was immediate. The delay was introduced
1.11 + * because despite warnings, plugins were using it in ways that would crash.
1.12 + * The new safe version can break cases that rely on immediate disconnects,
1.13 + * but ensures that plugins do not accidentally cause crashes.
1.14 + *
1.15 + * If you need immediate disconnects, use KickClientEx().
1.16 + *
1.17 + * Note: IsClientInKickQueue() will return true before the kick occurs.
1.18 + *
1.19 + * @param client Client index.
1.20 + * @param format Optional formatting rules for disconnect reason.
1.21 + * Note that a period is automatically appended to the string by the engine.
1.22 + * @param ... Variable number of format parameters.
1.23 + * @noreturn
1.24 + * @error Invalid client index, or client not connected.
1.25 + */
1.26 +native KickClient(client, const String:format[]="", any:...);
1.27 +
1.28 +/**
1.29 + * Immediately disconnects a client from the server.
1.30 *
1.31 * Kicking clients from certain events or callbacks may cause crashes. If in
1.32 * doubt, create a short (0.1 second) timer to kick the client in the next
1.33 @@ -647,7 +668,7 @@
1.34 * @noreturn
1.35 * @error Invalid client index, or client not connected.
1.36 */
1.37 -native KickClient(client, const String:format[]="", any:...);
1.38 +native KickClientEx(client, const String:format[]="", any:...);
1.39
1.40 /**
1.41 * Changes a client's team through the mod's generic team changing function.