Creating/Firing/Canceling events now use CStack to avoid the need to use new when possible
3 * Manages the standard flat files for admins. This is the file to compile.
4 * This file is part of SourceMod, Copyright (C) 2004-2007 AlliedModders LLC
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 public Plugin:myinfo =
27 author = "AlliedModders LLC",
28 description = "Authenticates Admins",
30 url = "http://www.sourcemod.net/"
33 public OnClientAuthorized(client, const String:auth[])
35 if (StrEqual(auth, "BOT")
36 || StrEqual(auth, "STEAM_ID_LAN"))
42 if ((id = FindAdminByIdentity("steam", auth)) == INVALID_ADMIN_ID)
47 decl String:buffer[256], String:account[64];
49 FormatUserLogText(client, buffer, sizeof(buffer));
51 if (GetAdminUsername(id, account, sizeof(account)))
53 LogMessage("%s authenticated to account \"%s\"", buffer, account);
55 LogMessage("%s authenticated to an anonymous account", buffer);
58 SetUserAdmin(client, id);