core/provider/console.cpp
author David Anderson <dvander@alliedmods.net>
Fri Nov 14 04:04:02 2008 -0600 (2008-11-14)
changeset 539 db914129ae01
parent 523 sourcemm/episode2/console.cpp@6f1630519b81
child 637 b66489d8aedc
permissions -rw-r--r--
Some reorganization.
     1 /**
     2  * vim: set ts=4 :
     3  * ======================================================
     4  * Metamod:Source
     5  * Copyright (C) 2004-2008 AlliedModders LLC and authors.
     6  * All rights reserved.
     7  * ======================================================
     8  *
     9  * This software is provided 'as-is', without any express or implied warranty.
    10  * In no event will the authors be held liable for any damages arising from 
    11  * the use of this software.
    12  * 
    13  * Permission is granted to anyone to use this software for any purpose, 
    14  * including commercial applications, and to alter it and redistribute it 
    15  * freely, subject to the following restrictions:
    16  *
    17  * 1. The origin of this software must not be misrepresented; you must not 
    18  * claim that you wrote the original software. If you use this software in a 
    19  * product, an acknowledgment in the product documentation would be 
    20  * appreciated but is not required.
    21  * 2. Altered source versions must be plainly marked as such, and must not be
    22  * misrepresented as being the original software.
    23  * 3. This notice may not be removed or altered from any source distribution.
    24  *
    25  * Version: $Id$
    26  */
    27 
    28 #include "console.h"
    29 #include "provider_ep2.h"
    30 
    31 using namespace SourceHook;
    32 
    33 SMConVarAccessor g_SMConVarAccessor;
    34 
    35 bool SMConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand)
    36 {
    37 	pCommand->SetNext(NULL);
    38 	icvar->RegisterConCommand(pCommand);
    39 
    40 	return true;
    41 }
    42 
    43 bool SMConVarAccessor::Register(ConCommandBase *pCommand)
    44 {
    45 	pCommand->SetNext(NULL);
    46 	icvar->RegisterConCommand(pCommand);
    47 
    48 	return true;
    49 }
    50 
    51 void SMConVarAccessor::Unregister(ConCommandBase *pCommand)
    52 {
    53 	icvar->UnregisterConCommand(pCommand);
    54 }
    55