Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:*:#: {
- ; if ($mid($nick,1,3) == gx-) && ($mid($nick,4-) isnum 1-30) {
- if (*[*]*has joined the game. *IP:* iswm $1-) {
- set %ipnick $3
- set %mon !
- tokenize 32 $8-
- if ($remove($strip($2),.) isnum) {
- $iif($sock(iplook), .timer 1 3 , $null) iplookup $strip($2) $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
- }
- if ($remove($strip($2),.) !isnum) {
- set %ipchan $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
- $iif($sock(iplook), .timer 1 3 , $null) .dns -h $strip($2)
- ; }
- }
- }
- }
- on *:sockopen:iplook: {
- if ($sockerr) { msg -at Error While Looking Up IP }
- sockwrite -nt $sockname GET %iplook HTTP/1.1 | sockwrite -nt $sockname User-Agent: Mozilla/4.0 | sockwrite -nt $sockname Host: whatismyipaddress.com | sockwrite $sockname $crlf }
- on *:sockread:iplook: {
- if ($sockerr) { msg -at Error While Looking Up IP }
- var %read | sockread %read
- if (*Invalid IP address.* iswm %read) || (*Page Not Found* iswm %read) { $iif(%mon == !, msg, notice) %ipchan 3Error14:7 Invalid IP address14. | sockclose $sockname | unset %ipchan %mon %iplook }
- if (*!*PAC* iswm %read) { set %ippac 1 }
- if (%ippac) {
- if (*ISP:* iswm %read) { set %ipin.isp $iif($gettok($gettok(%read,$calc($findtok(%read,ISP:</th,1,62) + 2),62),1,60) == /td, Not Found, $v1) }
- if (*Organization:* iswm %read) { set %ipin.org $iif($gettok($gettok(%read,$calc($findtok(%read,Organization:</th,1,62) + 2),62),1,60) == /td, Not Found, $v1) }
- }
- if (*/table></form* iswm %read) { unset %ippac }
- if (*h2 id="Geolocation-Information* iswm %read) { set %geost 1 }
- if (*Country:* iswm %read) { set %ipin.country $gettok($gettok(%read,$calc($findtok(%read,Country:</th,1,62) + 2),62),1,60) }
- if (*City* iswm %read) { set %ipin.city $gettok($gettok(%read,$calc($findtok(%read,City:</th,1,62) + 2),62),1,60) }
- if (*/table* iswm %read) && (%geost) {
- unset %geost
- msg %ipchan IP-LookUp: ( %ipnick is from Country: %ipin.country City: %ipin.city ISP: $iif($iif(%ipin.isp, %ipin.sip, %ipin.org), $v1, Not Found) )
- sockclose $sockname
- unset %ipin.* %ipchan %iplook %mon
- }
- }
- alias dnsblcheck { var %x = 1 | while (%x <= $numtok(%dnsbl,32)) { .dns $+($rev($1),.,$gettok(%dnsbl,%x,32)) | inc %x } | }
- alias iplookup { set %ipchan $2 | set %iplook $+(/ip/,$1) | $iif($sock(iplook), .timer 1 3 , $null) sockopen iplook whatismyipaddress.com 80 }
- on *:DNS: {
- if (%ipchan) {
- if ($raddress) {
- iplookup $raddress %ipchan
- }
- elseif (!$raddress) {
- echo %ipchan 3Error14: 7Hostname Could Not Be Resolved14.
- }
- }
- }
- alias rev { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement