Author Topic: AWarn 3.4 - Robust warning system  (Read 138525 times)

0 Members and 1 Guest are viewing this topic.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
AWarn 3.4 - Robust warning system
« on: January 12, 2013, 07:22:53 PM »
There is a new version released. It was a complete remake so I gave it its own thread. This version is no longer supported or available for download here. Please see the new thread.
http://forums.ulyssesmod.net/index.php/topic,7125.0.html


AWarn v.3.4


This addon for ULX allows you to warn users and will display to them the reason they were warned.
The addon will keep track of all historic warnings for review by admins.

Once a user reaches a pre-configurable number of warnings, they are kicked from the server.


Commands:
ulx warn <player> <reason> - Warn a player for a specified reason
!warn <player> <reason> - Warn a player for a specified reason

ulx seewarns <player> - generates a printout in console of all warnings a player has received in the past, when they received them and who issued the warning.
ulx removewarning<player> <count> - Removes an amount of active warnings from the targeted player. these are the warnings that count towards the player being kicked.
ulx deletewarnings<player> - Completely removes all history of a player's warnings.
ulx listwarnings - Prints a list to console for all connected players who have warnings. This shows their total active warnings and their total warning count.






Configurations (Note: these are server console variables. Run these from the server console)

ulx_warnkick_num [number] - this console variable will set the number of active warnings a player should be allowed to receive before being kicked.
ulx_warnkick_decayrate [number] - this console variable will set the amount of time (in minutes) before a player's warnings are reduced by 1. (note: a player must be connected for their warnings to decay)
ulx_warnkick_ban [number] - Determines if the script should tempban instead of kicking. (1 - On, 0 - Off) (Default: 0)
ulx_warnkick_bantime [number] - Time (in minutes) the script will ban players who have exceeded their threshold for warnings. (Default: 30)


Installation Instructions:
-Extract the ULX_Warn folder into your addons folder.
-Restart your server
-Enjoy!

ChangeLog:

v3.4
+Fixed an issue where warning a player as console would return an error. (Bug reported by rainbowdash)

v3.3
+Added in console variables to allow for temp banning in place of kicking. See above.

v3.2
+ Added a command to decrease a players active warnings
+ Added a command to remove all warning history for a player (SUPERADMIN access by default)
+ Added a command to list all active players and their total/active warnings
v3.1
+Fixed the display bug pointed out by SuperAero.

v3.0
+Release



Questions/Comments: Feel free to ask them in this thread.
« Last Edit: March 06, 2014, 03:10:08 AM by MrPresident »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: AWarn 3.0 - Robust warning system
« Reply #1 on: January 12, 2013, 07:26:03 PM »
Very nice!
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: AWarn 3.0 - Robust warning system
« Reply #2 on: January 12, 2013, 08:30:39 PM »
EXCELLENT!

Now possible enhancements.
A clear decay command, for when/if a superior ranking admin wants to clear a users 'automatic' watching or kick/ban them early, and more importantly, clear the timers automatically if they get kicked or banned early.
Mind  you, the reasons would still be tracked...just the timers/whatever would stop monitoring so not to be wasted on the trash that got warned but didn't like it and then got kicked early. :)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline SuperAero_

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: AWarn 3.0 - Robust warning system
« Reply #3 on: January 12, 2013, 11:27:00 PM »
1 Problem though, when I warn a player in everyone's chat it says they have been warned as well but they haven't??

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn 3.1 - Robust warning system
« Reply #4 on: January 13, 2013, 03:41:45 AM »
Opps! Sorry about that. I fixed it. I was calling pl in the message function which was returning nil. By default returning nil for a player in any of the tsay commands will print to all players.

I updated the file in my first post.

--------------

@JamminR - Great ideas, I'll add those when I have the time.

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: AWarn 3.1 - Robust warning system
« Reply #5 on: January 13, 2013, 04:29:01 AM »
DUDE. DUUUDE! You friggin rule!

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: AWarn 3.1 - Robust warning system
« Reply #6 on: January 13, 2013, 12:19:30 PM »
Amazing job! I'll be installing this on my server
My TTT server. Join the fun!

Offline SuperAero_

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: AWarn 3.1 - Robust warning system
« Reply #7 on: January 13, 2013, 06:36:47 PM »
The decay rate doesnt seem to work for me..

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn 3.1 - Robust warning system
« Reply #8 on: January 13, 2013, 06:51:13 PM »
Did you edit it? If so, how did you edit it? Default is every 30 minutes.

If you changed it with the console command in game, the new time wont take effect until the current timer ticks or until you restart the map/server.

Offline SuperAero_

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: AWarn 3.1 - Robust warning system
« Reply #9 on: January 13, 2013, 08:20:46 PM »
And would it be possible to add a !removewarn or something?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: AWarn 3.1 - Robust warning system
« Reply #10 on: January 13, 2013, 08:30:31 PM »
Why?
As mentioned previously, He's looking into adding a clear command for the monitoring timers, but, I don't ever see a time where I actually would want the file text removed.
Even if as a host one of my admins gave a warning I later wanted to remove 'tracking' timers of (so they wouldn't actually get kicked, or removed if already kicked), I'd like to be able to keep eye on why people were warned, and perhaps even know if a particular admin was warn happy.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn 3.1 - Robust warning system
« Reply #11 on: January 13, 2013, 08:48:14 PM »
I will add a way to reduce or reset a users warning count (the count that goes toward them being kicked)

Since it was requested, I will add a way to remove a players file all-together. But, I agree with Jam.. I don't see why anyone would NEED to use this, but everyone has their own reasons. I will, however, be restricting this particular access to superadmin by default.


Please let me know what happened with your issue 4 posts above though. Did the decay rate work for you?

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: AWarn 3.1 - Robust warning system
« Reply #12 on: January 14, 2013, 06:23:28 AM »
This script is hella awesome. Is it possible to have a console command that lists every player on the server currently that's received warnings? Then afterward you can use the aforementioned call to see what warnings they have?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn 3.1 - Robust warning system
« Reply #13 on: January 14, 2013, 03:17:00 PM »
Good idea Eccid. I will have a command that returns a report of all players connected and how many total reports they have.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn 3.1 - Robust warning system
« Reply #14 on: January 14, 2013, 05:42:52 PM »
V3.2
---------

+ Added a command to decrease a players active warnings
+ Added a command to remove all warning history for a player (SUPERADMIN access by default)
+ Added a command to list all active players and their total/active warnings

See original post for new commands.