From 6bc916fc3ccb63ebded52c42b8f9daa3627c6eb9 Mon Sep 17 00:00:00 2001 From: faketruth Date: Sat, 8 Sep 2012 20:49:29 +0000 Subject: 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 --- MCServer/Plugins/Core/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Core/main.lua b/MCServer/Plugins/Core/main.lua index 6b4af5533..b6599bce7 100644 --- a/MCServer/Plugins/Core/main.lua +++ b/MCServer/Plugins/Core/main.lua @@ -101,7 +101,7 @@ function Initialize( Plugin ) end -- Load whitelist, and add default values and stuff - WhiteListIni = cIniFile("whitelist.ini") + WhiteListIni = cIniFile( Plugin:GetLocalDirectory() .. "/whitelist.ini" ) if ( WhiteListIni:ReadFile() == true ) then if( WhiteListIni:GetValueB("WhiteListSettings", "WhiteListOn", false) == true ) then if( WhiteListIni:GetNumValues("WhiteList") > 0 ) then @@ -121,7 +121,7 @@ function Initialize( Plugin ) end -- Load banned players, and add default values and stuff - BannedPlayersIni = cIniFile("banned.ini") + BannedPlayersIni = cIniFile( Plugin:GetLocalDirectory() .. "/banned.ini" ) if ( BannedPlayersIni:ReadFile() == true ) then if( BannedPlayersIni:GetNumValues("Banned") > 0 ) then LOGINFO("Core: loaded " .. BannedPlayersIni:GetNumValues("Banned") .. " banned players.") -- cgit v1.2.3