AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] BetterBan (v1.0 1/6/17) (https://forums.alliedmods.net/showthread.php?t=292426)

Jacoblairm 01-06-2017 03:42

[CS:GO] BetterBan (v1.0 1/6/17)
 
2 Attachment(s)
Hey guys this is my first plugin ever so I'm sure the code isn't 100% optimised and might be a few bugs, so if you could check it out and give me some feedback that would be great!

Summary
BetterBan will SteamId ban a user when they are IP rejected from the server. Banning a Steam client using a generic method will just allow the user to change account and continue playing on the server. BetterBan will ban the client and also (for a specified amount of time bb_ip_banlength) will ban every user that attempt to connect using the same IP address.

You might be thinking, why dont I just ban their IP? Well this will work but wouldn't you like to ban their second account or third account (and so on) that try to connect but are IP rejected? This is the functionality of this plugin.

The only case that this plugin is inneffective is if the client changes their IP address before connecting with a new account.

Installation
Drag betterban.smx into your Sourcemod plugins folder and restart your server or type "sm plugins load betterban" into the server console.

How To Use
betterban <clientid> [Message to user]
  • The clientid can be retrieved by typing status and using the second userid digit, as highlighted in this image https://camo.githubusercontent.com/1...3834382e706e67
  • Message is optional and needs to be quoted. Example: betterban 1 "You have been banned for wallhacking"
  • Each entry of IP addresses (along with a EPOCH timestamp) are stored line by line in addons/sourcemod/configs/iplist.cfg
Commands:
bb_ip_banlength - determines the time (in seconds) that the IP addresses will ban a client, after this time the IP addresses will be removed from the iplist.cfg file. The default time is 432000 (5 days).

shanapu 01-06-2017 07:23

Re: [CS:GO] BetterBan (v1.0 1/6/17)
 
Quote:

Originally Posted by Jacoblairm (Post 2483994)
Hey guys this is my first plugin ever so I'm sure the code isn't 100% optimised and might be a few bugs, so if you could check it out and give me some feedback that would be great!

On the first fast view, good release!

But you mix old and new syntax. Just use the new one. Try to use
Code:

#pragma newdecals
Also you don't need to upload the .smx file when the compiler on forum works fine for this plugin.

Iirc the sourcemod devs recomment to store clients data like bans in mysql not in keyvalues. To many bans in a txt could result in perfomance issues.

TonyBaretta 01-06-2017 08:02

Re: [CS:GO] BetterBan (v1.0 1/6/17)
 
so who using dynamic ip is safe? imo ban people from IP when you don't know if is static or dynamic is pretty useless.

Jacoblairm 01-06-2017 09:15

Re: [CS:GO] BetterBan (v1.0 1/6/17)
 
Quote:

Originally Posted by TonyBaretta (Post 2484037)
so who using dynamic ip is safe? imo ban people from IP when you don't know if is static or dynamic is pretty useless.

This isnt exactly IP banning, it is flagging the IP for a specified time and whichever steam account is associated with the IP in that time are Id banned. The plugin is mainly used for the people who dont think about changing their IP after seeing "This SteamID is banned from the server", so they change account not knowing their IP has been flagged and this plugin will continually ban each account they use until they realise something is not right :)

mlov420 09-30-2018 07:14

Re: [CS:GO] BetterBan (v1.0 1/6/17)
 
Tested this plugin out this morning, don't seem to be able to ban anyone. Anytime I try, the following error happens:

Code:

L 09/30/2018 - 06:00:58: [SM] Exception reported: invalid handle 0 (error: 4)
L 09/30/2018 - 06:00:58: [SM] Blaming: betterban.smx
L 09/30/2018 - 06:00:58: [SM] Call stack trace:
L 09/30/2018 - 06:00:58: [SM]  [0] IsEndOfFile
L 09/30/2018 - 06:00:58: [SM]  [1] Line 105, /groups/sourcemod/upload_tmp/textDhGIEr.sp::banUser

I was looking for a ban plugin aside from Sourcebans that I could use to just moderate 1 specific server. The idea you have here is definitely nice. Not sure if this is an easy fix or not.


All times are GMT -4. The time now is 19:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.