sourcemm/concommands.h
author Scott Ehlert <ds@alliedmods.net>
Wed Sep 06 07:11:27 2006 +0000 (2006-09-06)
changeset 259 6d4eb02f9845
parent 192 47649a1d49e3
child 280 946485e00593
permissions -rw-r--r--
oops :\
     1 /* ======== SourceMM ========
     2 * Copyright (C) 2004-2006 Metamod:Source Development Team
     3 * No warranties of any kind
     4 *
     5 * License: zlib/libpng
     6 *
     7 * Author(s): David "BAILOPAN" Anderson
     8 * ============================
     9 */
    10 
    11 #ifndef _INCLUDE_CONCOMMANDS_H
    12 #define _INCLUDE_CONCOMMANDS_H
    13 
    14 /**
    15  * @brief Header for console commands
    16  * @file concommands.h
    17  */
    18 
    19 #include <interface.h>
    20 #include <eiface.h>
    21 #include "sourcemm.h"
    22 #include <convar.h>
    23 #include "sh_list.h"
    24 
    25 class SMConVarAccessor : public IConCommandBaseAccessor
    26 {
    27 	SourceHook::List<ConCommandBase*> m_RegisteredCommands;
    28 public:
    29 	virtual bool RegisterConCommandBase(ConCommandBase *pCommand);
    30 	bool Register(ConCommandBase *pCommand);
    31 	void MarkCommandsAsGameDLL();
    32 	void Unregister(ConCommandBase *pCommand);
    33 	void UnregisterGameDLLCommands();
    34 };
    35 
    36 class CAlwaysRegisterableCommand : public ConCommandBase
    37 {
    38 	ICvar *m_pICvar;
    39 public:
    40 	CAlwaysRegisterableCommand();
    41 	bool IsRegistered( void ) const;
    42 	// If already registered, removes us
    43 	// Then it registers us again
    44 	void BringToFront();
    45 };
    46 
    47 void ClientCommand_handler(edict_t *client);
    48 
    49 const char *GetPluginsFile();
    50 
    51 extern SMConVarAccessor g_SMConVarAccessor;
    52 
    53 #endif //_INCLUDE_CONCOMMANDS_H