cPluginManager:GetLuaPlugin() and lua_State
#11
(06-09-2012, 07:35 AM)FakeTruth Wrote: Yeah, sending messages is totally possible, because you can queue them and handle them in the tick function or something. But that means you cannot immediately get a value back

I think a message system is completely useless.

What if, for example, you have a separate permissions plugin next to MCServer's built in permissions, and your plugin needs to query the permissions plugin to see if the player can do a certain action. The hook requires you to return with a decision immediately, but with a message system you cannot query the permissions plugin and return a definitive decision in the same hook call...


A solution might be to use a single CriticalSection for all plugins, that way there wouldn't be any locking between plugins. But this can also create a deadlock in certain cases I think...
Reply
Thanks given by:


Messages In This Thread
RE: cPluginManager:GetLuaPlugin() and lua_State - by FakeTruth - 06-09-2012, 09:02 PM



Users browsing this thread: 2 Guest(s)