PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
on *:sockopen:city*: {
var %komut sockwrite -nt $sockname
%komut GET $+(/ip/,$token($sock($sockname).mark,2,42)) HTTP1.1/
%komut Host: whatismyipaddress.com
%komut $crlf
}
on *:sockread:city*: {
var %/ | sockread %/
if ($regex(%/,State/Region)) set %ipsehir [ $+ [ $token($sock($sockname).mark,2,42) ] ] $token($remove(%/,<tr>,<th>,</tr>,</th>,</td>,<td>),2,58)
if ($regex(%/,City:)) set %ipyer [ $+ [ $token($sock($sockname).mark,2,42) ] ] $token($remove(%/,<tr>,<th>,</tr>,</th>,</td>,<td>),2,58)
}
on *:sockclose:city*: {
var %nick $token($sock($sockname).mark,1,42), %ip $token($sock($sockname).mark,2,42)
$iif(!$window(@Giris-City),window -a @Giris-City)
echo @Giris-City 6GIRIS:2 %nick 6IP:2 %ip 6Sehir:2 %ipsehir [ $+ [ $token($sock($sockname).mark,2,42) ] ] 6Yer:2 %ipyer [ $+ [ $token($sock($sockname).mark,2,42) ] ]
unset %ipsehir [ $+ [ $token($sock($sockname).mark,2,42) ] ] %ipyer [ $+ [ $token($sock($sockname).mark,2,42) ] ]
}
alias cit {
var %rand $rand(0,99999)
sockopen $+(city,%rand) whatismyipaddress.com 80
sockmark $+(city,%rand) $1
}
on ^*:snotice:*connecting*:$iif(%city = on,who +I $9) | $iif(%city = on,set -e %nicks [ $+ [ $9 ] ] on)
raw 352:*:if %nicks [ $+ [ $6 ] ] == on { cit $+($6,*,$4) | unset %nicks [ $+ [ $6 ] ] | haltdef }
alias city {
if ($1 == on) { set %city on | echo -ea Giris-City Sistem Open! }
if ($1 == off) { set %city off | echo -ea Giris-City Sistem Deopen! }
}