Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
<- worktycho responded to your post.
I got another idea for the permission group system. What about a permission blacklist? The server first checks if the permission is in that list and if it is then cPlayer:HasPermission returns false. If it isn't in the blacklist then it continues doing what it was doing before.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I'm perfectly fine accepting a performance increase of halving the time necessary. But going from 10 seconds to under a second? That seems too far-fetched.
Found the issue with the original code, SQLite would dump each operation to disk, which was slowing things down. After wrapping the entire migration into a transaction, the whole thing works under a second, too. Maybe my work computer has a much faster disk access (doubtful, doesn't look it).
@STR_Warrior I have no idea what you're proposing. But everytime there's a whitelist and a blacklist together, there's the problem of items that are on neither list - are they allowed or not?
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Well for example you want a group that has all the WorldEdit permissions but you don't them to be able to load craftscripts. You simply put "worldedit.*" in the normal permissions and then put "worldedit.scripting.execute" in the blacklist.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Very well then, I shall implement that.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I've just found out quite a huge problem with the ranks handling - there is a possibility for a mismatch for player UUIDs when the server is offline - some methods use the player's UUID, which is the offline one, others don't have access to the UUID (because they don't have the cPlayer object available) so they use the cMojangAPI class to look up the UUID, and they work with the online UUIDs. I'll need to fix this somehow, probably mostly in the Core.