Dear me, I should have committed this long ago...
1) Added natives to create and manipulate global and private forward
2) Added natives to call forwards and functions
3) Added an IChanageableForward::RemoveFunction overload for convenience or something
4) Added test suite plugins for functions and forwards
5) Some random touch-ups to some include files
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is part of the SourceMod/SourcePawn SDK. This file may only be used
8 * or modified under the Terms and Conditions of its License Agreement, which is found
9 * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
10 * may change at any time. To view the latest information, see:
11 * http://www.sourcemod.net/license.php
16 #if defined _helpers_included
19 #define _helpers_included
22 * Formats a user's info as log text.
24 * @param client Client index.
25 * @param buffer Buffer for text.
26 * @param maxlength Maximum length of text.
28 stock FormatUserLogText(client, String:buffer[], maxlength)
33 new userid = GetClientUserId(client);
34 if (!GetClientAuthString(client, auth, sizeof(auth)))
36 StrCopy(auth, sizeof(auth), "UNKNOWN");
38 if (!GetClientName(client, name, sizeof(name)))
40 StrCopy(name, sizeof(name), "UNKNOWN");
43 /** Currently, no team stuff ... */
45 Format(buffer, maxlength, "\"%s<%d><%s><>\"", name, userid, auth);
49 * Returns plugin handle from plugin filename.
51 * @param filename Filename of the plugin to search for.
52 * @Returns Handle to plugin if found, INVALID_HANDLE otherwise.
54 stock Handle:FindPluginByFile(const String:filename[])
56 decl String:buffer[256];
58 new Handle:iter = GetPluginIterator();
61 while (MorePlugins(iter))
63 pl = ReadPlugin(iter);
65 GetPluginFilename(pl, buffer, sizeof(buffer));
66 if (StrCompare(buffer, filename) == 0)
72 return INVALID_HANDLE;