Added cPlugin_NewLua::GetLocalDirectory() and exported it to Lua so plugins can store their settings in their own folder.
Core now stores banned players and whitelist data in its own directory git-svn-id: http://mc-server.googlecode.com/svn/trunk@850 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -68,7 +68,7 @@ bool cPlugin_NewLua::Initialize()
|
||||
ManualBindings::Bind( m_LuaState );
|
||||
}
|
||||
|
||||
std::string PluginPath = FILE_IO_PREFIX + std::string("Plugins/") + m_Directory + "/";
|
||||
std::string PluginPath = GetLocalDirectory() + "/";
|
||||
|
||||
// Load all files for this plugin, and execute them
|
||||
AStringList Files = GetDirectoryContents(PluginPath.c_str());
|
||||
@@ -131,6 +131,15 @@ bool cPlugin_NewLua::Initialize()
|
||||
|
||||
|
||||
|
||||
AString cPlugin_NewLua::GetLocalDirectory(void) const
|
||||
{
|
||||
return FILE_IO_PREFIX + std::string("Plugins/") + m_Directory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cPlugin_NewLua::OnDisable()
|
||||
{
|
||||
cCSLock Lock( m_CriticalSection );
|
||||
|
||||
Reference in New Issue
Block a user