01-07-2014, 04:34 AM
You can reload a players permissions but I don't think you can reload the groups.ini.
Include MySQL
|
01-07-2014, 04:34 AM
You can reload a players permissions but I don't think you can reload the groups.ini.
01-07-2014, 05:12 AM
(01-07-2014, 04:32 AM)daniel0916 Wrote: Is it possible to reload the groups.ini without restart the server? Is it hard to add a reload function? Currently it is impossible to reload without a restart. A reload function will be moderately difficult to write. The main difficulty is that each cPlayer holds a pointer to all the groups they are currently in. So a reload will have to: 1, Load the new group.ini into a new structure (but keep the old structures) 2, For each world, for each player walk their (old) groups and assign new groups based on the name 3, For each world, for each player re-resolve their permissions
01-07-2014, 05:48 AM
(01-07-2014, 05:12 AM)xoft Wrote:(01-07-2014, 04:32 AM)daniel0916 Wrote: Is it possible to reload the groups.ini without restart the server? Is it hard to add a reload function? Okey. Can i restart the server? The plugin check if the mysql db have new permissions and then it edit the groups.ini and restart the server. Is this possible?
01-07-2014, 06:25 AM
Yes.
cRoot:Get():QueueExecuteConsoleCommand("restart");
01-08-2014, 02:25 AM
01-08-2014, 02:52 AM
There's no real guide.
LuaRocks is somewhat like a packaging system (like apt-get or yum for the OS, but this is for Lua). You need to invoke it to install "rocks" (packages) and then you can use those rocks from any lua code. For example: Install the LFS rock: Code: sudo luarocks install luafilesystem local lfs = require ("lfs"); for FileName in lfs.dir(".") do -- use the LFS function dir ... end Sorry I have only LFS example, that's the only one I've used so far. Here's a list of public rocks available: http://luarocks.org/repositories/rocks/
01-08-2014, 04:20 AM
(01-08-2014, 02:52 AM)xoft Wrote: There's no real guide. Okey. But when i will install MySQL in LuaRocks it don't work: C:\>luarocks install LuaSQL-MySQL MYSQL_DIR=C:\Program Files (x86)\MySQL Error: No results matching query were found. I'm programming in windows.
01-09-2014, 02:50 AM
I tried to use mysql in lua:
Code: require "luasql.mysql" Then it comes when i start the server this: [17:45:54] LUA: 2 - error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': dynamic libraries not enabled; check your Lua installation [17:45:54] Error in plugin CryptoPermissions in file Plugins/CryptoPermissions/onlogin.lua I don't know how can i activate dynamic libraries..
01-09-2014, 05:31 AM
It would seem that your LuaRocks is somewhat broken. On the other hand, I had been experimenting with them heavily before I managed to get them working on windows and truthfully I never managed to actually compile any Rock from source, I had to download and install a binary distribution.
I'm sorry, but I don't have any more answers, you'll need to experiment on your own here.
01-09-2014, 05:39 AM
(01-09-2014, 05:31 AM)xoft Wrote: It would seem that your LuaRocks is somewhat broken. On the other hand, I had been experimenting with them heavily before I managed to get them working on windows and truthfully I never managed to actually compile any Rock from source, I had to download and install a binary distribution. How have you installed it on windows? I installed it on Linux and there come this error.. Maybe i made something false. Or do you know someone who are using luasql? |
« Next Oldest | Next Newest »
|