Ban Logger

A Config Script for Counter-Strike: Source

Greetings! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending im_the_new_guy points.
  • Post: Give im_the_new_guy your thoughts on this Script.
  • Vote: Help im_the_new_guy win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Resistance is futile...

Sign up

Already a Bananite? Login

An administration tool to help keep track of what users have been banned.

90 lines | 3 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
block load
{
        es_keygroupload ban_logger |ban_logger
        es_makepublic "Warning - created by I'm the new guy, go easy @ Hideexec.net"
        es_xmsg #multi #green[#lightgreenBan-Logger#green]#default Loaded!
        es_xsetinfo creator "I'm the new guy, go easy :D"
        es_xdoblock corelib/noisy_on]
        // Set this 1 if you want the script to automatically ban a player, if the banned_user.cfg fails.
        es_xsetinfo auto_ban 0
}

event player_activate
{
        es_xset group_exists 0
        es_exists group_exists keygroup ban_logger
        if (server_var(group_exists) == 0) do
        {
                es_keygroupcreate ban_logger
        }
        es_xset exists 0
        es_exists exists key ban_logger event_var(es_steamid)
        if (server_var(exists) == 0) do
        {
                es_keycreate ban_logger event_var(es_steamid)
                es_keysetvalue ban_logger event_var(es_steamid) banned 0
                es_keysetvalue ban_logger event_var(es_steamid) steamid 0
                es_keysetvalue ban_logger event_var(es_steamid) ip 0
                es_keysetvalue ban_logger event_var(es_steamid) duration 0
                es_keysetvalue ban_logger event_var(es_steamid) banner 0
                es_keysetvalue ban_logger event_var(es_steamid) perm_ban 0
        }
        es_xset is_banned 0
        es_keygetvalue is_banned ban_logger event_var(es_steamid) banned
        if (server_var(is_banned) == 1) do
        {
                if (server_var(auto_ban) == 1) do
                {
                        es_xset ban_perm 0
                        es_keygetvalue is_banned ban_logger event_var(es_steamid) perm_ban
                        if (server_var(ban_perm) == 1) do
                        {
                                es_xmsg #multi #green[#lightgreenBan-Logger#green]#default The player:#lightgreen event_var(es_username) #default was re-banned.
                                es ma_ban event_var(userid) 0
                        }
                }
        }
        es_keysetvalue ban_logger event_var(es_steamid) name event_var(es_username)
}

event player_changename
{
        es_xset exists 0
        es_exists exists key ban_logger event_var(es_steamid)
        if (server_var(exists) == 1) do
        {
                es_keysetvalue ban_logger event_var(es_steamid) name event_var(newname)
        }
}

event server_addban
{
        es_keysetvalue ban_logger event_var(networkid) banned 1
        es_keysetvalue ban_logger event_var(networkid) steamid event_var(networkid)
        es_keysetvalue ban_logger event_var(networkid) ip event_var(ip)
        es_keysetvalue ban_logger event_var(networkid) duration event_var(duration)
        es_keysetvalue ban_logger event_var(networkid) banner event_var(by)
        if (event_var(duration) equalto "0") do
        {
                es_keysetvalue ban_logger event_var(networkid) perm_ban 1
        }
        es_keygroupsave ban_logger |ban_logger
}

block unload
{
        es_keygroupsave ban_logger |ban_logger
        es_keygroupdelete ban_logger
        es_xmsg #multi #green[#lightgreenBan-Logger#green]#default UnLoaded & Saved!
        es_xdoblock corelib/noisy_off
}

event round_end
{
        es_keygroupsave ban_logger |ban_logger
}

event round_start
{
        es_msg #multi #greenBan_Logger was created by#lightgreen server_var(creator) #greenSteamID = #lightgreenSTEAM_0:1:14214794
}

Ban Logger

Summary:

This script is designed to log each time a player is banned. It will log whether the ban was a permanent ban, or a temp ban. There is also a setting to allow the script to auto ban players who were perm banned. The Script takes note of Username/Steamid/IP/Ban duration/whether its perm or not etc.

How does it work:

There is only 1 variable to set as this is mostly a passive script. It sits in the background checking whether players have been banned in the past and banned those who are perm banned. If you want to wipe the data, simply go into addons/eventscripts/ban_logger/ and delete ban_logger_db.txt (this is the data base file where all data is stored and refered to).

How do I install it:

You install it by simply creating a folder called: ban_logger inside Cstrike/Addons/Eventscripts/. Then copy and paste the script below into a blank notepad file. Once pasted, save the file as es_ban_logger.txt and you are done. Once extracted saved, go into autoexec.cfg or server.cfg and type es_load ban_logger then save. Alternatively, instead of editing autoexec.cfg or server.cfg you can simply type es_load ban_logger into console and change the map.

ENJOY

Posts

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Key Authors
Im the new guy
Creator

Submitter

im_the_new_guy avatar
im_the_new_guy avatar Online
Homepage
Member Joined 8y
2,805 points Ranked 1638th
22 medals 1 legendary 3 rare
  • Submitted 50 Maps Medal icon
  • 6 years a member Medal icon
  • Returned 1000 times Medal icon
  • Submitted 20 Maps Medal icon
  • Mapper of the Month, November 2013 Medal icon
  • Mapper of the Month, December 2013 Medal icon

im_the_new_guy avatar
im_the_new_guy

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Attributes

Stats

Posts
2
Views
2,618
Date Added
7y
bcp.crwdcntrl.net tracking pixel