Author Topic: Is there a way to limit the amount of time a user can be votebanned for?  (Read 1907 times)

0 Members and 1 Guest are viewing this topic.

Offline YourPalRob

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
I currently grant access to voteban for all my regulars but they keep banning people for 999999 minutes instead of 60 which would be suitable. I was wondering if there's a way to limit the maximum amount of time to 60 minutes?

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
yes i believe its in the restrictions if i remember correctly
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline YourPalRob

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Any chance you could me more on that, I'm pretty confused.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
To allow regular users to voteban other regular users (only) for up to 60 minutes, run this in your console:

Code: [Select]
ulx groupallow user "ulx voteban" "#user 1:60"
If you want them to be able to voteban anyone, switch out "#user" for "*".
Experiencing God's grace one day at a time.

Offline YourPalRob

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Does this work the same if I put it in the groups.txt file?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
No. No it does not. We generally shy away from instructing users to edit the data files by hand... too easy to screw them up.
« Last Edit: April 17, 2013, 11:03:24 AM by Megiddo »
Experiencing God's grace one day at a time.

Offline YourPalRob

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
This works gloriously but is there a way to prevent having to do !voteban user 60, Can I set the default to 60?

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
this would requre a small edit in the utility.lua file in the add-on and add a arg setting to the ban time for the ban command
ps: this is for people who know what they are doing  editing ulx files can result in breaking or errors
,default = 60
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."