forked from halo-battle/game
Crappy fix for IPv6 compatibility (watch multi-account!)
This commit is contained in:
parent
934c6a89fd
commit
a5586af0ba
@ -72,6 +72,7 @@ function encode_ip($dotquad_ip=FALSE)
|
||||
if(!$dotquad_ip) $dotquad_ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$ip_sep = explode('.', $dotquad_ip);
|
||||
if (empty($ip_sep[3])) $ip_sep = explode('.', "127.0.0.1");
|
||||
return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user