Whitelist/Blacklist specific countries

h1web

VIP
Sep 2, 2015
206
134
131
If you have a Sinusbot which connects with the Same IP as the Server runs (localhost, 127.0.0.1) it kicks the Bot "Your Country is not on the Whitelist, or if Blacklist, it gets kicked as well because theres no Country detected."

Can we fix this, so the Bot doesnt gets kicked, if he's from "No Country" ?

Thanks! I Love this script.
 

Najsr

Moderator
TeamSpeak Developer
Apr 23, 2016
483
249
167
If you have a Sinusbot which connects with the Same IP as the Server runs (localhost, 127.0.0.1) it kicks the Bot "Your Country is not on the Whitelist, or if Blacklist, it gets kicked as well because theres no Country detected."

Can we fix this, so the Bot doesnt gets kicked, if he's from "No Country" ?

Thanks! I Love this script.
If you know the format of the country parameter when client has no country you can simply add it to the blacklist array.
 

XRV-Webix

Member
May 2, 2016
111
55
64
If you know the format of the country parameter when client has no country you can simply add it to the blacklist array.
Actually the country parameter for localhost is empty. Something that the script can't accept or it will ban everything. So, it's impossible to allow localhost on script.
This script is useless like i said on my previous post.
It's easyer, better, smoother, faster and with better performance to use iptables (or any other firewall) to block (or allow) the unwanted countries.
Personal note: You guys are so stupid to build up complex scripts to do tasks that can be easyer done with other softwares.
 

kalle

high minded
Contributor
Oct 28, 2015
411
253
178
how to change to the script also ignore UID in the Whitelist
Create new array with wl values, and in if check add new function with !in_array of connected user, if its not in wl array do ban/ kick.
PHP:
// whitelist of uids
$wl = array("aaaaaaaaa", "bbbbbbbbb");

//check connecting uid
if(... !in_array($wl)){
       // do something
}
 
Top