sourcemm/concommands.h
author Pavol Marko <pavolmarko@gmail.com>
Sat May 12 09:01:23 2007 +0000 (2007-05-12)
changeset 330 d801744b795c
parent 282 7a237e9ea5a1
child 345 600e30820ea7
permissions -rw-r--r--
Minor problem (initialization order in ExecutableClass)
     1 /* ======== SourceMM ========
     2  * Copyright (C) 2004-2007 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_smm.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