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

adonradon

Member
Joined
Jul 13, 2016
Messages
27
Reaction score
17
Points
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:

MTGmati

Member
Joined
Feb 4, 2016
Messages
10
Reaction score
0
Points
35
This would give the council the status of which ignores the kick ?
 

tagKnife

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

adonradon

Member
Joined
Jul 13, 2016
Messages
27
Reaction score
17
Points
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
Joined
Oct 2, 2015
Messages
343
Reaction score
270
Points
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
Joined
Apr 26, 2015
Messages
1,029
Reaction score
896
Points
216
I dream of the day when we will be able to ban CIDR. I hate ip regex ;(
 

adonradon

Member
Joined
Jul 13, 2016
Messages
27
Reaction score
17
Points
50
I get it, I don't have free time for develop my script. it looks good @DrWhat
 

0x0539

Retired Staff
Contributor
Joined
Jan 30, 2016
Messages
1,334
Reaction score
1,146
Points
254
100% CPU ;c
Has a very high use of CPU indeed, should just connect once a minute to check instead. I had 85% CPU usage myself when using it.
 

tagKnife

Well-Known Member
Joined
Oct 2, 2015
Messages
343
Reaction score
270
Points
146
Top