4 $mibbit_ips = array("207.192.75.252", "64.62.228.82", "78.129.202.38", "109.169.29.95");
6 $public=true; //Force one of the settings below (reject connection if nothing is matching)
7 $not_public['staff.webgamesnet.net']=true; // servername in lower chars (exceptions from $public)
8 $passwd="*"; // global password to log in normaly without any special modes like below (you can set this to false)
12 $users[$user]['modes']="+SDHnIk";
13 $ip="10.".rand(1,255).".".rand(1,255).".".rand(1,255);
14 $users[$user]['host']=$ip.".fake";
15 $users[$user]['ip']=$ip;
16 $users[$user]['ident']="spoof";
19 $users[$user]['access']=true;
25 if($not_public[strtolower(ARG_SERVER)]) $pass=false;
26 if($passwd && ARG_PASS == $passwd) $pass = true;
31 if($fakemibbitip && array_search(ARG_REMOTEIP, $mibbit_ips)) {
33 //we should have a hey ip in the ident
34 if(strlen(ARG_USERNAME) == 8) {
35 $ip=hexdec(substr(ARG_USERNAME,0,2)).".".hexdec(substr(ARG_USERNAME,2,2)).".".hexdec(substr(ARG_USERNAME,4,2)).".".hexdec(substr(ARG_USERNAME,6,2));
36 $host="c".strtoupper(ARG_USERNAME).".spoof.mibbit.WebGamesNet";
40 } else if($fakewebircip && (ARG_REMOTEIP == "127.0.0.1" || ARG_REMOTEIP == "::1") && preg_match("/(.*)\/(.*) - WEBIRC/i",ARG_REALNAME)) {
42 $split = explode(" ",ARG_REALNAME);
43 $split = explode("/",$split[0]);
44 $ipsplit = explode(".",$split[1]);
45 $host = "c".strtoupper(dechex($ipsplit[0]).dechex($ipsplit[1]).dechex($ipsplit[2]).dechex($ipsplit[3])).".spoof.webirc.WebGamesNet";
49 } else if($fakelocalip && (ARG_REMOTEIP == "127.0.0.1" || ARG_REMOTEIP == "::1")) {
50 $md5=md5(ARG_USERNAME." ".ARG_SERVER);
51 $ip="10.".hexdec(substr($md5,0,2)).".".hexdec(substr($md5,2,2)).".".hexdec(substr($md5,4,2));
52 $host="c".strtoupper(substr($md5,0,6)).".localIP";
54 if(ARG_ACCOUNT == "") {
55 if(!$pass) iauth_reject("You are not allowed to use this server.");
57 if(array_key_exists(strtolower(ARG_ACCOUNT), $users)) {
58 $user = $users[strtolower(ARG_ACCOUNT)];
59 $ident = (array_key_exists('ident', $user) ? $user['ident'] : $ident);
60 $host = (array_key_exists('host', $user) ? $user['host'] : $host);
61 $ip = (array_key_exists('ip', $user) ? $user['ip'] : $ip);
62 $modes = (array_key_exists('modes', $user) ? $user['modes'] : null);
63 iauth_return(null, $ident, $host, $ip, $modes);
65 iauth_reject("You are not allowed to use this server.");
68 iauth_return(null, $ident, $host, $ip, $modes);