ULX

Author Topic: Getting ulx ban to display in days,weeks etc  (Read 1728 times)

0 Members and 2 Guests are viewing this topic.

Offline ozzyos2009

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Getting ulx ban to display in days,weeks etc
« on: December 03, 2016, 04:19:42 PM »
My ULib/ULX versions (run "ulx version" in console):
ULib v2.60
ULX v3.70

Game mode(s) I am having this problem on: TTT

I simply wanted to know if there was a way to make ulx ban/banid to display "Hours,Days" etc instead of minutes when banning.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Getting ulx ban to display in days,weeks etc
« Reply #1 on: December 03, 2016, 05:07:46 PM »
It already does log and echo in that format. Can you take a screenshot of what you're talking about?
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: Getting ulx ban to display in days,weeks etc
« Reply #2 on: December 03, 2016, 05:14:22 PM »
Hint from ban command
Quote
0 for perma. 'h' for hours, 'd' for days, 'w' for weeks. EG, '2w5d' for 2 weeks 5 days"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline ozzyos2009

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Getting ulx ban to display in days,weeks etc
« Reply #3 on: December 03, 2016, 08:00:20 PM »
Hint from ban command

Oh, I probably should've looked in util.lua/looked at the hint first. My bad. Thank you though :)

Edit: That isn't there for me. Thank you for the find!
« Last Edit: December 03, 2016, 08:30:54 PM by ozzyos2009 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Getting ulx ban to display in days,weeks etc
« Reply #4 on: December 04, 2016, 07:25:03 AM »
Apologies.
You're right. (And I wouldn't expect everyone to have had to browse our code to see that)
I found the line searching our forums, and found an old post that had our code in it.
The hint for it is no longer there. That code will (is supposed to) take time input in that manner though, and the fancylog call will display it that way.
https://github.com/TeamUlysses/ulx/blob/b7adea4fed9d3b582dabc3db5d198cbda899b2a7/lua/ulx/modules/sh/util.lua#L91

I can only presume we removed the long hint because of it's length.
Perhaps we could put it in the help line.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming