dvander@368: /** dvander@368: * vim: set ts=4 : dvander@368: * ====================================================== dvander@368: * Metamod:Source dvander@368: * Copyright (C) 2004-2007 AlliedModders LLC and authors. dvander@368: * All rights reserved. dvander@368: * ====================================================== dvander@368: * dvander@368: * This software is provided 'as-is', without any express or implied warranty. dvander@368: * In no event will the authors be held liable for any damages arising from dvander@368: * the use of this software. dvander@368: * dvander@368: * Permission is granted to anyone to use this software for any purpose, dvander@368: * including commercial applications, and to alter it and redistribute it dvander@368: * freely, subject to the following restrictions: dvander@368: * dvander@368: * 1. The origin of this software must not be misrepresented; you must not dvander@368: * claim that you wrote the original software. If you use this software in a dvander@368: * product, an acknowledgment in the product documentation would be dvander@368: * appreciated but is not required. dvander@368: * 2. Altered source versions must be plainly marked as such, and must not be dvander@368: * misrepresented as being the original software. dvander@368: * 3. This notice may not be removed or altered from any source distribution. dvander@368: * dvander@368: * Version: $Id$ dvander@368: */ dvander@368: dvander@368: #include "console.h" dvander@368: #include "provider_ep2.h" dvander@368: dvander@368: using namespace SourceHook; dvander@368: dvander@368: SMConVarAccessor g_SMConVarAccessor; dvander@368: dvander@368: static int s_nDLLIdentifier = 0x3058132; // A unique identifier indicating which DLL this convar came from dvander@368: dvander@368: bool SMConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand) dvander@368: { dvander@368: pCommand->SetNext(NULL); dvander@368: icvar->RegisterConCommand(pCommand); dvander@368: dvander@368: return true; dvander@368: } dvander@368: dvander@368: bool SMConVarAccessor::Register(ConCommandBase *pCommand) dvander@368: { dvander@368: pCommand->SetNext(NULL); dvander@368: icvar->RegisterConCommand(pCommand); dvander@368: dvander@368: return true; dvander@368: } dvander@368: dvander@368: void SMConVarAccessor::Unregister(ConCommandBase *pCommand) dvander@368: { dvander@368: icvar->UnregisterConCommand(pCommand); dvander@368: } dvander@368: