Author Topic: Stereotypical first post/ Admin only tools  (Read 2268 times)

0 Members and 1 Guest are viewing this topic.

Offline NegroCollegeFund

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
Stereotypical first post/ Admin only tools
« on: October 25, 2009, 06:35:27 PM »
After many searches and much reading which yielded only clues, I seek your assistance.

I want to limit 2 tools to be admin only, cause they crash my server and kinda fail at working properly. I downloaded URestrict or something but it jacked up so I concluded it wasn't worth the effort. There must be a way I can edit some file. I was able to make an entity admin only by adding ent.adminspawnable to shared.lua, however that does not seem to work for the tools. It seems that I could add "ulx toolallow <toolmode>" to the server.cfg but I dont know how to use that or if it even works like that. So could someone explain to me how I can make 2 tools admin only. Try to be as specific as you can to prevent further unnecessary confusion.

Incase it matters, the tools I want to restrict are Madjawa's Laser 2.0 cause its too epic, and someone's NPC Spawn platform cause it won't undo or clean up. So when anyone makes them I have to wait for them to disappear or physically remove each one with the remover tool. To be honest I'm not even sure if they disappear after the owner leaves, I never tested that.

Edit: Found this:

I found this thread: http://forums.ulyssesmod.net/index.php/topic,3414.0.html

Assuming I update to the latest SVN, I could in theory do:

Code: [Select]
server.cfg
ulx tooldeny someTool

Code: [Select]
groups.txt
"someGroup"
{
   "deny"   
   {
   }
   "allow"   
   {
    "ulx tooldenyoverride"
   }
   "inherit_from"   
   {
   }
}

Am I correct?

If I can follow this same method, where do I find the actual name of the tool I want to deny, referred to above as "someTool"?
« Last Edit: October 25, 2009, 07:25:47 PM by NegroCollegeFund »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Stereotypical first post/ Admin only tools
« Reply #1 on: October 25, 2009, 08:14:01 PM »
toolallow and tooldeny was removed because URestrict supplants it. What's wrong with URestrict?
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Stereotypical first post/ Admin only tools
« Reply #2 on: October 25, 2009, 09:17:36 PM »
I believe those commands are still in ULX 3.4, not our SVN though.
URestrict only supports current SVN.
SVN is, for all intents and purposes, very unstable right now.
Not due to bugs, but due to many of our former server.ini functions not yet being rewritten

I believe the command that will show you the specific tool name is gm_toolmode or toolmode.
Select the tool you want to know, then type that in console. (sorry, forget which one)

Also, ULX's server.ini would be better for ulx commands. Take a copy from the addons/ulx/cfg folder, paste it in gmod/cfg, then edit it.
server.cfg is a Source server file, and can (and often will) run before the Gmod Lua engine even starts.

« Last Edit: October 25, 2009, 09:36:34 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline NegroCollegeFund

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
Re: Stereotypical first post/ Admin only tools
« Reply #3 on: October 25, 2009, 11:29:55 PM »
I was pretty sure I was on to it so I took the most obvious steps. Second reply was dead on. As you predicted it did fail in server.cfg because ulx wasn't loaded, but i figured there was some file in there and i found the server file in the ulx/cfg folder or where ever that was. I do have version 3.4, so I figure that's why URestrict didn't work. Nothing worked and I got a series of errors. In addition, if you intend to phase out support for this, I'd best back up these files. I don't want to lose functionality in a future update. I hope I misunderstand you when you say that "toolallow and tooldeny were removed". I stayed on XP cause vista got rid of too many small things I'd grown accustomed to. Thanks a lot for your help and I'm sure ill be back again when i get confused. This place is very professional and your addons rule. One more thing, after an extended period of time, my admin menu will error, and the buttons like "Disable PvP Damage" and the likes cease to work. A server restart resolves the issue and I've not noticed a catalyst. Not a big issue really. Thanks once more!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Stereotypical first post/ Admin only tools
« Reply #4 on: October 25, 2009, 11:57:38 PM »
No misunderstanding.
ULX 3.5 will have no tooldeny or allow.
URestrict from our releases forum, a plugin for ULib (yes, svn only), has much more configuration and capability over what tools, weapons and sbox_<whatever> limits can be applied.
ULX was never meant to control those as much as many like you request.
Jay saw that request, and decided to fill the niche.

We understand change is difficult.
To be quite honest, so few used tool<function>, the majority won't miss it.
Don't be afraid to check back here... though some of the changes may seem drastic... even with my conservative optimism of change... I like what I've seen so far, both as a ULX user, and as a behind the scene's coder.

As for your 'menu buttons break after time' issue... please see this post. If you figure out anything that might help, feel free to post. - (quite lengthy discussion) - http://forums.ulyssesmod.net/index.php/topic,4107.0.html
In all honesty, I personally don't believe this is a direct ULX issue...BUT... that doesn't mean it isn't.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming