sourcemod/core/sm_srvcmds.h
David Anderson 21fb4856e0 added license headers
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40375
2007-01-25 22:36:38 +00:00

69 lines
2.0 KiB
C++

/**
* ===============================================================
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
* ===============================================================
*
* This file is not open source and may not be copied without explicit
* written permission of AlliedModders LLC. This file may not be redistributed
* in whole or significant part.
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_
#define _INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_
#include "sourcemod.h"
#include <IRootConsoleMenu.h>
#include "PluginSys.h"
#include "sourcemm_api.h"
#include <convar.h>
#include <sh_list.h>
#include <sh_string.h>
#include "sm_trie.h"
using namespace SourceMod;
using namespace SourceHook;
struct ConsoleEntry
{
String command;
String description;
};
class RootConsoleMenu :
public IConCommandBaseAccessor,
public SMGlobalClass,
public IRootConsoleCommand,
public IRootConsole
{
public:
RootConsoleMenu();
~RootConsoleMenu();
public: //IConCommandBaseAccessor
bool RegisterConCommandBase(ConCommandBase *pCommand);
public: //SMGlobalClass
void OnSourceModStartup(bool late);
void OnSourceModShutdown();
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *cmd, unsigned int argcount);
public: //IRootConsole
bool AddRootConsoleCommand(const char *cmd, const char *text, IRootConsoleCommand *pHandler);
bool RemoveRootConsoleCommand(const char *cmd, IRootConsoleCommand *pHandler);
void ConsolePrint(const char *fmt, ...);
const char *GetArgument(unsigned int argno);
unsigned int GetArgumentCount();
const char *GetArguments();
void DrawGenericOption(const char *cmd, const char *text);
public:
void GotRootCmd();
private:
Trie *m_pCommands;
List<ConsoleEntry *> m_Menu;
};
extern RootConsoleMenu g_RootMenu;
#endif //_INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_