Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Oth on May 22, 2007, 10:21:52 AM

Title: Toolallow/deny
Post by: Oth on May 22, 2007, 10:21:52 AM
First of all, I'd like to thank all you ULX dev's for making an Admin's job alot easier!

I run a small 8 people build server, but I've been rather restricted in what Stools and such to add, due to potential abuse.
I thought I struck gold when i found out about Toolallow/deny.

To test it out, I downloaded a Particle Maker Stool, and did ULX tooldeny "Particle Maker"

Worked like a charm. Couldn't select the tool.

Then I tried to do ULX toolallowuser Oth "Particle Maker" (Oth being me, a superadmin)
It Echoes in the console that I've been allowed to use the Stool, but I can't select it.
Even after using just Toolallow instead of Toolallowuser, I can't select the tool anymore! I have no idea how to undo this, as the command seems broken.
I have no idea where the allow/deny information is stored, so I can't remove it manually either...

If anyone could tell me how to get the commands working, or where the relevant information is stored, I'd be very thankfull. (has to be somewhere, it was carried over a server restart)

Thanks eitherway.
Title: Re: Toolallow/deny
Post by: JamminR on May 22, 2007, 11:58:25 AM
Oth,
 toolallow/deny is global, and I believe that it would be over user level access.
That is, if global = no, then all users = no, even if toolallowuser = yes
I'm on my laptop right now (my main machine is down) so I don't have all the code quickly handy.
I'll download and see if I can confirm this.
Megiddo or spbogie may come onboard and answer with more information. They have more experience with the deep inner workings of the code than I. :)
Title: Re: Toolallow/deny
Post by: JamminR on May 22, 2007, 12:20:30 PM
Code: [Select]
local function tool( ply, tr, toolmode )
if (gdeny[ toolmode ] and not ply:IsAdmin()) or (ply.deny and ply.deny[ toolmode ]) then
ULib.tsay( ply, "This toolmode has been disabled." )
return false
end
end

That code is called wnenever someone attempts to select a tool.
gdeny is the table that contains the tools added using tooldeny.
I'm not sure why its not working.
Title: Re: Toolallow/deny
Post by: Oth on May 23, 2007, 05:41:09 AM
I'm guessing I've got an add-on which is stopping the commands from functioning properly... I'll try to see if I can find whats causing this.
But if i'm reading this right, admin's should be exempt from tooldeny? So even without toolallow, I should be able to use it.

Thanks for your help though.

edit: I need to learn to read properly :P
Title: Re: Toolallow/deny
Post by: spbogie on May 23, 2007, 01:02:17 PM
JamminR is correct. The current implementation only stores the tools which are denied. When you allow a toolmode it just removes it from the appropriate deny table (global or user). There is no way, currently, to deny globaly and then whitelist certain users.
Title: Re: Toolallow/deny
Post by: Oth on May 26, 2007, 07:18:09 AM
Well, that certainly cleares things up for me, thanks a bunch!

If any of you folks wanna enjoy a bit of spacebuilding on a nicely moderated server, drop by once a while.
The name begins with Oth, so it shouldn't be too hard to find.

Cheers.