• Print

Author Topic: AWarn2 - Advanced Warning Module  (Read 603557 times)

0 Members and 1 Guest are viewing this topic.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #210 on: April 06, 2015, 04:12:57 pm »
I've released version 2.4.
I made a small change to the !warn chat command that may have been causing some issues with some people. I was never able to replicate the issues people were complaining about, but this might fix it. To update:

1. Shut down your server.
2. Remove the old awarn2 folder.
3. Install the new awarn2 folder
4. Turn on server and enjoy!

Let me know if you're still having issues.



Note: I've tested this version on 2 dedicated servers as well as a listen server and all the features appear to be working 100% for me. Let me know if you have any issues, but make sure you follow the update instructions above first.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: AWarn2 - Advanced Warning Module
« Reply #211 on: April 06, 2015, 05:45:34 pm »
Update: So the full warning text now appears

(i.e. I type "!warn syst3M4TiK test warn" it displays
"[Super Admin] [AWarn] You have been warned by syst3M4TiK for test warn."
instead of
"[Super Admin] [AWarn] You have been warned by syst3M4TiK for test."
)

BUT

The server will not kick/ban me or any other player when I reach the threshold. I've tested it on myself and other players who were willing to be guinea pigs.


All options are checked, but they act as if the ConVars have been set to 0.
If I click a checkmark, it displays "[AWarn] Value (awarn_kick) has been set to (0)" and the option STAYS checked.
Also to note: The Ban Time and Decay Rate values are not correct.

I have had multiple Superadmins attempt to change these through the GUI and none have succeeded, we all face the same problem.

Would clearing the warns database fix this problem? Are there console commands that I can run to change the ConVars?

Also, my current server.cfg setup with the awarn options:

Code: Lua
  1. //AWARN
  2. awarn_kick 1
  3. awarn_kick_threshold 3
  4. awarn_ban 1
  5. awarn_ban_threshold 5
  6. awarn_ban_time 7200
  7. awarn_decay 1
  8. awarn_decay_rate 10080
  9. awarn_reasonrequired 1
Once you get to know me, you'll find you'll have never met me at all.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #212 on: April 06, 2015, 08:21:39 pm »
Try not putting the values in the server.cfg file.
They're not true convars, they're values that get saved and read from the database.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: AWarn2 - Advanced Warning Module
« Reply #213 on: April 06, 2015, 08:32:23 pm »
Where can I edit the values outside of the GUI?
Once you get to know me, you'll find you'll have never met me at all.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #214 on: April 06, 2015, 11:53:25 pm »
you can't. I tried using convars but they weren't networking for me properly so I decided to just write my own system for it.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: AWarn2 - Advanced Warning Module
« Reply #215 on: April 07, 2015, 01:08:43 am »
Alright, ill mess around a bit and see if I can force it to run it how it needs to. Also, where are the warnings themselves saved?
Once you get to know me, you'll find you'll have never met me at all.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #216 on: April 07, 2015, 01:36:42 am »
Don't force it to do anything. If it doesn't do something you need by default, let me know and I can add it if plausible.
The warnings as well as the settings are stored in your server's sv.db file.

Offline Zeroi9

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: AWarn2 - Advanced Warning Module
« Reply #217 on: April 15, 2015, 08:48:19 pm »
How can I make decay stay at 10800 minutes?
And is it possible that  warnings automatically get removed once they've decayed?
Either way, great plugin :)

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #218 on: June 27, 2015, 11:29:55 pm »
Someone requested I add some Hook Callbacks, so I did.

Hook Callbacks

AWarnPlayerWarned( Player target_ply, Player ply, String reason )
   target_ply - Player being warned
   ply - Warning Admin
   reason - Reason for warning
AWarnPlayerIDWarned( String tarid, Player ply, String reason )
   tarid - 64bit SteamID of player being warned.
   ply - Warning Admin
   reason - Reason for warning
AWarnLimitKick( Player target_ply )
   target_ply -Player being kicked for passing the warning kick threshold.
AWarnLimitBan( Player target_ply )
   target_ply - Player being banned for passing the warning ban threshold.

Offline |E|N| Main Fighter

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: AWarn2 - Advanced Warning Module
« Reply #219 on: July 03, 2015, 02:20:45 pm »
Hello,

Afew things,
First are you going to make the MySQL function work "awarn_mysqloo(DOESNT WORK YET).lua" as I read from that it doesn't work so I was just wondering if you were going to make it work or not.
Second is there anyway to make the warn decay rate longer than 100 minutes because when I enter 1440 minutes it goes back to 100 minutes.
Third is there anyway to make the command different so like I want the command to be "/warn" instead of "!warn". Its not really that important that one.

Thats all,
Thanks in advanced :)

Main

Offline Norwegian

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • Steam
Re: AWarn2 - Advanced Warning Module
« Reply #220 on: September 16, 2015, 05:45:00 am »
Hey,

I'm getting this error on my server.

[ERROR] addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:2: 'then' expected near '='
  1. unknown - addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:0
 
Any solutions?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #221 on: September 16, 2015, 11:56:52 am »
Hey,

I'm getting this error on my server.

[ERROR] addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:2: 'then' expected near '='
  1. unknown - addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:0
 
Any solutions?

Yes, redownload the TTT module. There was a typo in the code. It should work now.

Offline Norwegian

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • Steam
Re: AWarn2 - Advanced Warning Module
« Reply #222 on: September 16, 2015, 01:07:40 pm »
Now the module works, but, it gives me this error when someone does actually teamkill.

Code: [Select]
[ERROR] addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:6: attempt to call method 'GetRole' (a nil value)
  1. fn - addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:6
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:179
    3. TakeDamageInfo - [C]:-1
     4. unknown - gamemodes/terrortown/gamemode/player.lua:867

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: AWarn2 - Advanced Warning Module
« Reply #223 on: September 16, 2015, 04:15:05 pm »
Are you using this module in a TTT server? The module you are having issues with is designed specifically for TTT.

GetRole only works in TTT.


Edit: Its possible that the player died from a non-player entity which would cause that error to happen. I changed the code to check for this.
If players are able to teamkill and not get warned, let me know the specifics of how they did it.
« Last Edit: September 16, 2015, 04:19:16 pm by MrPresident »

Offline Norwegian

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • Steam
Re: AWarn2 - Advanced Warning Module
« Reply #224 on: September 18, 2015, 05:41:11 am »
Yes, I'm running it on a TTT server.

I'll try something though, you know how the folder for TTT is called terrortown? Well, maybe that's supposed to go into the gamemode name thing?

Edit: Well that made the module not run at all... Anyways, I tried the script again, was testing with two bots, and I shot the innocent bot as a innocent in the head with a shotgun. Gave me this error in console. I could try with real players aswell, but I doubt it'd make a difference.

Code: [Select]
[ERROR] addons/awarn2/lua/autorun/sh_awarn.lua:109: attempt to index local 'target' (a number value)
  1. awarn_getUser - addons/awarn2/lua/autorun/sh_awarn.lua:109
   2. awarn_con_warn - addons/awarn2/lua/autorun/server/sv_awarn.lua:253
    3. fn - addons/awarn2/lua/awarn/modules/auto_warn_ttt_teamkill.lua:9
     4. unknown - addons/ulib/lua/ulib/shared/hook.lua:179
      5. FireBullets - [C]:-1
       6. ShootBullet - gamemodes/terrortown/entities/weapons/weapon_tttbase.lua:318
        7. PrimaryAttack - gamemodes/terrortown/entities/weapons/weapon_tttbase.lua:242
         8. unknown - addons/tttdamagelogs/lua/damagelogs/sv_damageinfos.lua:46
« Last Edit: September 18, 2015, 05:45:36 am by Norwegian »

  • Print