diff -r 000000000000 -r e82968c21606 sourcemm/concommands.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sourcemm/concommands.h Tue Sep 18 20:03:47 2007 +0000 @@ -0,0 +1,53 @@ +/* ======== SourceMM ======== + * Copyright (C) 2004-2007 Metamod:Source Development Team + * No warranties of any kind + * + * License: zlib/libpng + * + * Author(s): David "BAILOPAN" Anderson + * ============================ + */ + +#ifndef _INCLUDE_CONCOMMANDS_H +#define _INCLUDE_CONCOMMANDS_H + +/** + * @brief Header for console commands + * @file concommands.h + */ + +#include +#include +#include "sourcemm.h" +#include "convar_smm.h" +#include "sh_list.h" + +class SMConVarAccessor : public IConCommandBaseAccessor +{ + SourceHook::List m_RegisteredCommands; +public: + virtual bool RegisterConCommandBase(ConCommandBase *pCommand); + bool Register(ConCommandBase *pCommand); + void MarkCommandsAsGameDLL(); + void Unregister(ConCommandBase *pCommand); + void UnregisterGameDLLCommands(); +}; + +class CAlwaysRegisterableCommand : public ConCommandBase +{ + ICvar *m_pICvar; +public: + CAlwaysRegisterableCommand(); + bool IsRegistered( void ) const; + // If already registered, removes us + // Then it registers us again + void BringToFront(); +}; + +void ClientCommand_handler(edict_t *client); + +const char *GetPluginsFile(); + +extern SMConVarAccessor g_SMConVarAccessor; + +#endif //_INCLUDE_CONCOMMANDS_H