[php] Kick users who put a domain, ip address or Swear Words in the client name

adonradon

Member
Jul 13, 2016
27
17
50
if they attempt to join a server with 5 or more numbers in the nickname It's for stopping users from advertising with IPs
For example: "If you want to block "Swear Words" in the client name. You can block with this script or whatever you want"

1-) chmod +x clientcontroller.sh
2-) Edit Config.cfg with your informations
3-) ./clientcontroller.sh start/stop
4-) You must use PHP 5.5+

Thanks For Help @Eskirex

PHP:
            // 0 = permanently u can write there secs like 1 hour / 3600
            if($cfg['kickclient']){
                if(StriStr($clientname['client_nickname'] , "test")){
                    $tsAdmin->banClient($clientname['clid'], 0, $cfg['clientkickmessage']);
                }
            }



PHP:
.com , .net , .org , .xyz , .info , .pro , .tk , .work

PHP:
            if($cfg['kickclient']){
                if(StriStr($clientname['client_nickname'] , ".net")){
                    $tsAdmin->clientKick($clientname['clid'], "server", $cfg['clientkickmessage']);
                }
            }

 
Last edited:

tagKnife

Well-Known Member
Oct 2, 2015
343
270
146
You know you can just make ban rules for these... you don't need a bot to continuesly check client names.
 

adonradon

Member
Jul 13, 2016
27
17
50
You know you can just make ban rules for these... you don't need a bot to continuesly check client names.
They are different things as like for example I banned u from my server .*Wha.* regular ban u can join the server with wHa, wha, whA such and such but the script that when u wrote like ".net" u can check ".net" , ".neT", ".NET" such and such..
they are different and u can develop this script whatever u want but on the other hand u can't develop to "TS3's regular ban" :)
 

tagKnife

Well-Known Member
Oct 2, 2015
343
270
146
They are different things as like for example I banned u from my server .*Wha.* regular ban u can join the server with wHa, wha, whA such and such but the script that when u wrote like ".net" u can check ".net" , ".neT", ".NET" such and such..
they are different and u can develop this script whatever u want but on the other hand u can't develop to "TS3's regular ban" :)
Then learn how to use regex correctly.

FieWEsG.png


1 ban rule, Blocks all domains, No need for a shit bot to strain the server with unnecessary tasks
That ban rule took me 30 seconds to make.

and it maybe took you? 5 minutes? to make a script to do "worst" functionally then what TeamSpeak already has... now that's just dumb.

Now I benchmarked your script. it's using 9% CPU (on my 8 core server) and sending 70 requests a second to the server causing the teamspeak server to use 7% CPU (Teamspeak server is well know for using next to no CPU) to download the client list. Now I'm no efficient programmer my self, but that's just grossly inefficient

eAas9Gr.png

this makes me sick to see :(

Now my own bot on the other hand when running with 10 plugins using 0% CPU teamspeak server using 0% cpu as well.
ajFTmEi.png


Now your channel version of this, can't be dealt with a ban rule, But its still gross. I will be adding it to my bot, But properly implemented.

more information about my bot here: https://r4p3.net/threads/developement-drbotteamspeak3-a-real-modular-teamspeak-3-bot.2741/
 
Last edited:

ehthe

Retired Staff
Contributor
Apr 26, 2015
1,028
896
216
I dream of the day when we will be able to ban CIDR. I hate ip regex ;(
 
Top