/** * basecommands.sp * Implements basic admin commands. * This file is part of SourceMod, Copyright (C) 2004-2007 AlliedModders LLC * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Version: $Id$ */ #include #pragma semicolon 1 public Plugin:myinfo = { name = "Basic Commands", author = "AlliedModders LLC", description = "Basic Admin Commands", version = SOURCEMOD_VERSION, url = "http://www.sourcemod.net/" }; new Handle:hBanForward = INVALID_HANDLE; new Handle:hAddBanForward = INVALID_HANDLE; new Handle:hBanRemoved = INVALID_HANDLE; public OnPluginStart() { LoadTranslations("common.cfg"); LoadTranslations("plugin.basecommands.cfg"); RegAdminCmd("sm_kick", Command_Kick, ADMFLAG_KICK, "sm_kick <#userid|name> [reason]"); RegAdminCmd("sm_map", Command_Map, ADMFLAG_CHANGEMAP, "sm_map "); RegAdminCmd("sm_rcon", Command_Rcon, ADMFLAG_RCON, "sm_rcon "); RegAdminCmd("sm_cvar", Command_Cvar, ADMFLAG_CONVARS, "sm_cvar [value]"); RegAdminCmd("sm_execcfg", Command_ExecCfg, ADMFLAG_CONFIG, "sm_execcfg "); RegAdminCmd("sm_who", Command_Who, ADMFLAG_GENERIC, "sm_who [#userid|name]"); RegAdminCmd("sm_ban", Command_Ban, ADMFLAG_BAN, "sm_ban <#userid|name> [reason]"); RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban "); RegAdminCmd("sm_addban", Command_AddBan, ADMFLAG_RCON, "sm_addban