ds@661: /** ds@661: * vim: set ts=4 : ds@661: * =============================================================== ds@661: * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. ds@661: * =============================================================== ds@661: * ds@661: * This file is not open source and may not be copied without explicit ds@661: * written permission of AlliedModders LLC. This file may not be redistributed ds@661: * in whole or significant part. ds@661: * For information, see LICENSE.txt or http://www.sourcemod.net/license.php ds@661: * ds@661: * Version: $Id$ ds@661: */ ds@661: ds@661: #ifndef _INCLUDE_SOURCEMOD_CORECONFIG_H_ ds@661: #define _INCLUDE_SOURCEMOD_CORECONFIG_H_ ds@661: ds@661: #include "sm_globals.h" ds@661: #include ds@661: #include ds@661: ds@661: using namespace SourceMod; ds@661: ds@661: class CoreConfig : ds@661: public SMGlobalClass, ds@661: public ITextListener_SMC, ds@661: public IRootConsoleCommand ds@661: { ds@661: public: // SMGlobalClass ds@661: void OnSourceModAllInitialized(); ds@661: void OnSourceModShutdown(); dvander@978: void OnSourceModLevelChange(const char *mapName); ds@661: public: // ITextListener_SMC ds@661: SMCParseResult ReadSMC_KeyValue(const char *key, const char *value, bool key_quotes, bool value_quotes); ds@661: public: // IRootConsoleCommand ds@661: void OnRootConsoleCommand(const char *command, unsigned int argcount); ds@661: public: ds@661: /** ds@661: * Initializes CoreConfig by reading from core.cfg file ds@661: */ ds@661: void Initialize(); ds@661: private: ds@661: /** ds@661: * Sets configuration option by notifying SourceMod components that rely on core.cfg ds@661: */ dvander@663: ConfigResult SetConfigOption(const char *option, const char *value, ConfigSource, char *Error, size_t maxlength); ds@661: }; ds@661: dvander@978: extern bool SM_AreConfigsExecuted(); dvander@978: extern void SM_ExecuteAllConfigs(); dvander@978: extern void SM_ExecuteForPlugin(IPluginContext *ctx); dvander@978: extern void SM_ConfigsExecuted_Global(); dvander@978: extern void SM_ConfigsExecuted_Plugin(unsigned int serial); dvander@978: ds@661: extern CoreConfig g_CoreConfig; ds@661: ds@661: #endif // _INCLUDE_SOURCEMOD_CORECONFIG_H_