amb1919 - HasEndOfMapVote finished should be separate from determining if the vote will run at all.
amb1915 - Mapchooser should disable round end changes if forced to change early.
amb1901 - Timer errors with mapchooser
3 * =============================================================================
4 * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
5 * =============================================================================
7 * This file is part of the SourceMod/SourcePawn SDK.
9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, version 3.0, as published by the
11 * Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 * You should have received a copy of the GNU General Public License along with
19 * this program. If not, see <http://www.gnu.org/licenses/>.
21 * As a special exception, AlliedModders LLC gives you permission to link the
22 * code of this program (as well as its derivative works) to "Half-Life 2," the
23 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
24 * by the Valve Corporation. You must obey the GNU General Public License in
25 * all respects for all other code used. Additionally, AlliedModders LLC grants
26 * this exception to all derivative works. AlliedModders LLC defines further
27 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
28 * or <http://www.sourcemod.net/license.php>.
33 #if defined _handles_included
36 #define _handles_included
39 * Handle helper macros.
48 * Closes a Handle. If the handle has multiple copies open,
49 * it is not destroyed unless all copies are closed.
51 * @note Closing a Handle has a different meaning for each Handle type. Make
52 * sure you read the documentation on whatever provided the Handle.
54 * @param hndl Handle to close.
55 * @return True if successful, false if not closeable.
56 * @error Invalid handles will cause a run time error.
58 native bool:CloseHandle(Handle:hndl);
61 * Clones a Handle. When passing handles in between plugins, caching handles
62 * can result in accidental invalidation when one plugin releases the Handle, or is its owner
63 * is unloaded from memory. To prevent this, the Handle may be "cloned" with a new owner.
65 * @note Usually, you will be cloning Handles for other plugins. This means that if you clone
66 * the Handle without specifying the new owner, it will assume the identity of your original calling
67 * plugin, which is not very useful. You should either specify that the receiving plugin should
68 * clone the handle on its own, or you should explicitly clone the Handle using the receiving plugin's
71 * @param hndl Handle to clone/duplicate.
72 * @param plugin Optional Handle to another plugin to mark as the new owner.
73 * If no owner is passed, the owner becomes the calling plugin.
74 * @return Handle on success, INVALID_HANDLE if not cloneable.
75 * @error Invalid handles will cause a run time error.
77 native Handle:CloneHandle(Handle:hndl, Handle:plugin=INVALID_HANDLE);
80 * Do not use this function. Returns if a Handle and its contents
81 * are readable, whereas INVALID_HANDLE only checks for the absence
84 * This function is intended only for tests where the validity of a
85 * Handle can absolutely not be known.
87 * Do not use this to check the return values of functions, or to
88 * check if timers should be closed (except in very rare cases).
89 * This function is for very specific usage and using it for general
90 * purpose routines can and will hide very subtle bugs.
92 * @param hndl Handle to test for validity.
93 * @return True if handle is valid, false otherwise.
95 #pragma deprecated Do not use this function.
96 native bool:IsValidHandle(Handle:hndl);