IDED Posted September 5, 2012 Posted September 5, 2012 Ok so I've been lingering on someone elses thread about this but really I guess I should make my own. So here we go Version 1 http://pastebin.com/nGYnjqhv Version 2 http://pastebin.com/gUVEMSsJ The problem section here is somewhat unusual In version 1 - -modifyworld.blocks.(place|interact|destroy).(125-99999) - -modifyworld.items.(craft|have|pickup).(125-256) - -modifyworld.items.(craft|have|pickup).(385-99999) this doesn't seem to work well at least modifyworld doesn't seem to understand or recognise these lines as during my tests the user is still able to do all the listed actions with those blocks but the other blocks do seem to being blocked. In version 2 the reverse becomes true - -modifyworld.blocks.(place|interact|destroy).7 - -modifyworld.blocks.(place|interact|destroy).19 - -modifyworld.blocks.(place|interact|destroy).46 - -modifyworld.items.(craft|have|pickup|drop|enchant|throw).7 - -modifyworld.items.(craft|have|pickup|drop|enchant|throw).19 - -modifyworld.items.(craft|have|pickup|drop|enchant|throw).46 - -modifyworld.items.(craft|have|pickup|drop|enchant|throw).368 - modifyworld.blocks.(place|interact|destroy).(1-124) - modifyworld.items.(craft|have|pickup|drop|enchant|throw).(1-124) - modifyworld.items.(craft|have|pickup|drop|enchant|throw).(257-384) In this one we haven't used the modifyworld.* as we are explicitly stating the actions a user can take but now the user cannot interact at all with any blocks even those specified. I'm so lost with this one I've tried adding .?* to the end of the numbers, [] or () around the numbers even without any at all and I don't want to have to list every item individually as that will bloat the file and the hours of work I will need to pour into it. Any and all ideas welcome as I'm stumped or maybe I'm just doing something stupid that will be obvious to you that isn't to me hey either way I owe ya a beer if you can point it out to me. Quote
vibur Posted September 6, 2012 Posted September 6, 2012 As far as I know, doing (x-z) doesn't work. You have to do (x|y|z). Quote
IDED Posted September 6, 2012 Author Posted September 6, 2012 really so I have to list every block damn I was hoping their websites wiki was actually correct for once lol Quote
vdubmastertech Posted September 6, 2012 Posted September 6, 2012 Version 1 try this: - -modifyworld.blocks.(place|interact|destroy).(125-99999.?*) - -modifyworld.items.(craft|have|pickup).(125-256.?*) - -modifyworld.items.(craft|have|pickup).(385-99999.?*) Version 2 try this: If you are wanting them to have interaction with ONLY those things then you don't need the nodes that you have negated with "-". Since you aren't using modifyworld.* at the end of that group like you stated, you don't need to take anything away from that group. Without modifyworld.*, anything you don't have explicitly listed for that group will be blocked. Similar to the version 1 fix, add ".?*" after the last item number in your sequence and get rid of the first 7 nodes that are negated, they aren't needed as stated above. - modifyworld.blocks.(place|interact|destroy).(1-124.?*) - modifyworld.items.(craft|have|pickup|drop|enchant|throw).(1-124.?*) - modifyworld.items.(craft|have|pickup|drop|enchant|throw).(257-384.?*) Quote
vdubmastertech Posted September 6, 2012 Posted September 6, 2012 Starting to really consider starting a "ModifyWorld Help" thread :P Quote
IDED Posted September 6, 2012 Author Posted September 6, 2012 To be honest you should message the mod team and see if they will let you expand their threads to include all these additional corrections as I use regex for alot of asp and php but never run into problems like these lol I will try these and update with results as I think my issues maybe a bit deeper than I imagine as I have started encountering various unusual error since my world reset and perms update (like the admin being able to chat but no one but admin can see it... now thats a random one considering everyone can chat and all perms are inherited as you can see so I'm thinking a corruption of some form but I cant be sure until i eliminate all other issues so full reinstall ad add plugins one by one testing after each i guess until its all working. Quote
vdubmastertech Posted September 6, 2012 Posted September 6, 2012 Actually I just took a closer look at your pastebin again. I'm guess you are "unlocking" things as people rank up? Quote
vdubmastertech Posted September 6, 2012 Posted September 6, 2012 If so: Block everything you want blocked from Rank1 using negative nodes in the way that I've already showed you. Next rank, Rank2, add the permissions to use only the items you want unlocked at Rank2. The remaining things you have already blocked in Rank1 will still be blocked for Rank2 via inheritance. So on down the line. Also I would suggest separating your Moderator and Admin groups from the rest and have them on their own inheritance tree. If you still want user to be Moderator or Admin and be apart of your other groups, just add a sub-group to that specific users permissions. Using inheritance like you are is very prone to problems when you mix in Admin and Moderator groups with the rest. It's mainly a problem because it is so confusing and overly complicated when you can just separate those groups into their own inheritance tree. Quote
IDED Posted September 6, 2012 Author Posted September 6, 2012 Yeah I had taken that into account for now I was just trying to get it working at default then I was going to start only adding the additionals but as I was having issues I was having two copies one for guest and one for member so I could do two tests each restart rather than one. vdub do you have steam? if so feel free to add me IDED2010 I'll have to buy you a game or sumin for all ya help Ok I resolved the chat thing apparently towny.* breaks the chat as when it was removed and replaced with each node set individually it works fine, another crazy solution to a problem that shouldnt really occur as why towny is controlling my chat i have no idea as its not even enabled in the world in question. Ok the blocks are now blocked but the items work fine for example from pex debug log checked for "modifyworld.items.craft.126", "modifyworld.items.*" found yet I am using - -modifyworld.items.(craft|have|pickup).(125-256.?*) - -modifyworld.items.(craft|have|pickup).(385-99999.?*) as you said so I take it this is wrong still ? ok its not the (craft|have|pickup) bit as it also doesnt work with - -modifyworld.items.craft.(125-256.?*) - -modifyworld.items.craft.(385-99999.?*) - -modifyworld.items.have.(125-256.?*) - -modifyworld.items.have.(385-99999.?*) - -modifyworld.items.pickup.(125-256.?*) - -modifyworld.items.pickup.(385-99999.?*) all items/block can still be crafted, picked up and in their inv without modifyworld jumping into action. Quote
vdubmastertech Posted September 6, 2012 Posted September 6, 2012 Can you post your permissions.yml file for what you have so far so I can look at the entire thing? Suspecting it might have something to do with your inheritance tree and where you've placed modifyworld.* Quote
CoderJ Posted September 6, 2012 Posted September 6, 2012 Not to belittle you, but have you check your config.yml for ModifyWorld? It should probably look like this.... enable: true item-restrictions: false inform-players: true whitelist: false use-material-names: false drop-restricted-item: false item-use-check: true (I truncated the messages, not important to discussion). I do not believe the enable: true is needed anymore, but the wiki is contradictory (it's been edited out, but the beginning informs the reader it must be enabled.... ugh). Your syntax looks right (at least by the regex standard PEX wiki claims to follow); the following - -modifyworld.blocks.(destroy|place|interact).(1-128).?* will prevent placing/interacting/destroying blocks 1 - 128 plus any sub-blocks (the .?* goes on the outside, otherwise PEX is looking for 128's DV, instead of DV for all included blocks) If you can't seem to get a good handle on what permissions are/are not being checked, toggle the debug flag (WARNING: Unless you love watching console spam, only do this on a test server or toggle for a test player (command is /pex user <user> toggle debug)!) This will output all permission checks to console/log so you can see what's going on (tell you what permissions are checked and what allows the check to pass). EDIT: Noted the other thread says use .?*, but the wiki says :?*.... honestly, I do each item individually in the statement (so (27530|27530:*)) and it appears to work on my test server (haven't rolled to live yet, I mucked something up in that permissions.yml so groups are a member of a member....) Quote
IDED Posted September 6, 2012 Author Posted September 6, 2012 Pex - Full permissions.yml - http://pastebin.com/GYCViLU2 Pex - Config.yml - http://pastebin.com/WW5LcGGZ But just to note I'm still only working on the guest level here so there is no inheritance for that group so I'm doubtful of it having any effects in reverse. CoderJ its not belittling to admit that someone may have more experience than I using this system. Modifyworld is configured but I have set more options as you pointed out but the only option you have set there differently to me is the item-use-check: true so I will alter mine to match and see if that produces more results, I assume that will make it recognise those rules? as Im use pex toggle debug already and I've noted that it isnt seeing them it just sees the items.* based on the final perm of modifyworld.* but I must admit I think I screwed up with my current one with the bracket placements so I will try with you new layout ).?* instead of inside. Yep already using debug but I do notice it doesnt always seem to fire as I have noticed some placements and using certain blocks doesnt seem to triiger the modifyworld event or if it does at least the debug doesnt post it to the server.log file. Don't worry I'm a programmer (namely asp, vbscript, javascript, jquery, html) so I do have a very good grip of code and how it functions that's why I posted syntax as the subject as I understand the code and layout etc, its just the exact syntax that seems to be catching me out as shown by the above as I had it just slightly wrong for the final regex statement but the original code is correct and laid out exactly as stated on pex wiki which I have studied for days now lol my issues is lack of experience as we all know documentation is rarely updated for such large community projects and is often outdated where as someone who has had use of it may well see the answer easily due to knowledge that isnt published currently, or as in this case is skipped completely as its not a fore seen usage of the plugin. Ok checking back in. Coder your suggestion doesnt seem to have changed anything item-use-checks:true is set but no additional debug posts and no difference in the guests permissions beyond what vdub has already helped with. But I have noticed once again certain events aren't firing e.g. when I craft a collector I get a lot of 2012-09-06 23:58:12 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:58:20 [iNFO] User IDED checked for "modifyworld.items.use.4306.on.block.58", "modifyworld.items.*" found 2012-09-06 23:58:20 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:58:20 [iNFO] User IDED checked for "worldguard.override.infinite-stack", no permission found 2012-09-06 23:59:01 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:59:02 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:59:03 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:59:03 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:59:04 [iNFO] User IDED checked for "worldguard.region.bypass.world", no permission found 2012-09-06 23:59:04 [iNFO] User IDED checked for "worldguard.override.infinite-stack", no permission found but as you can see not a single craft check happens in the log even though during this period I crafted 14 collectors which are banned via the modifyworld regex So is it that modifyworld is broken or is it purely that it doesnt trigger everytime and thus is unreliable... I have no idea which but either way it seems for crafting, having, using, etc modify world with tekkit just doesnt function as expected but then it was never ment for this kind of usage as its aimed at vanilla, unless anyone else has a suggestion. Ok pardon my stupidity after looking at this for hours it seems I couldnt see the forest for the trees, I've removed the modifyworld.items.* from the guest now and it has restricted some actions now but still is not removing them from people. Quote
CoderJ Posted September 7, 2012 Posted September 7, 2012 Off the bat, PEX checks from top to bottom in permissions list... soooooo... line 35: - modifyworld.items.* overrides any other denial of modifyworld.items you may call for default (so, therefor, it's breaking all your denials since you inherit from default on all groups). Hence... 2012-09-06 23:58:20 [iNFO] User IDED checked for "modifyworld.items.use.4306.on.block.58", "modifyworld.items.*" found My advice is to always (always) (always) put permissions that deny users the ability to do something first in PEX, to avoid that. Put your "-modifyworld.items.<whatever>" in the first couple of lines, then the permissions to allow. There's probably more, but I'm actually heading to bed so I'll look better tmrw. Quote
IDED Posted September 7, 2012 Author Posted September 7, 2012 Ahh I found the issue beyond that enabling use which I hadnt for a reason previously as it breaks the checks for interact so that was what broke it beyond the mistake I made previously with forgetting to remove the items command. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.