wiremod / advduplicator

Garry's Mod add-on that allows a player to save and load contraptions
http://www.wiremod.com
Apache License 2.0
67 stars 43 forks source link

"FileOpts: Bad Action Command!" on CheckPerms fail #55

Closed NullEntity closed 10 years ago

NullEntity commented 10 years ago

If AdvDupe.CheckPerms returns false, AdvDupe.FileOpts will incorrectly give a "FileOpts: Bad Action Command!" error. I fixed this myself by moving the permission check into the if statement:

    if (action == "delete") then
        if not AdvDupe.CheckPerms(ply, "", dir, "delete") then return end
         ...
    end

but you may wish to find a cleaner way to do this.

Nebual commented 10 years ago

You're correct, and that's the approach I'd take too. Since the repository's version of AdvDupe.CheckPerms always returns true, what addon do you have that implements it?

NullEntity commented 10 years ago

I added a simple ULX group check to it so only certain members can upload dupes to the server.