cPluginManager:GetLuaPlugin() and lua_State
#5
Just string isn't enough, IMO - I would prefer to have similar to cIniFile possibilities...

It could be done through modifying existing cIniFile code: instead of creating new instance (new object) of cIniFile on such code:
Code:
PLUGIN.IniFile = cIniFile("ChunkWorx.ini")
server could give a pointer to existing one (and create only if cIniFile instance with such name wasn't created before)

In other words, plugin1 requests cIniFile instance, server had no instances referencing to that exact ini file, server creates new cIniFile instance and return a pointer on it to plugin1
Then plugin2 requests cIniFile instance for same .ini, server found that it has such cIniFile instance and return a pointer to it.

This way plugins could share some ammount of data of differend kinds.
Reply
Thanks given by:


Messages In This Thread
RE: cPluginManager:GetLuaPlugin() and lua_State - by Taugeshtu - 06-07-2012, 04:54 AM



Users browsing this thread: 1 Guest(s)