Advertisement
OrFeAsGr

Untitled

Nov 28th, 2016
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.73 KB | None | 0 0
  1. ON *:TEXT:*:#: {
  2.   ; if ($mid($nick,1,3) == gx-) && ($mid($nick,4-) isnum 1-30) {
  3.   if (*[*]*has joined the game. *IP:* iswm $1-) {
  4.     set %ipnick $3
  5.     set %mon !
  6.     tokenize 32 $8-
  7.     if ($remove($strip($2),.) isnum) {
  8.       $iif($sock(iplook), .timer 1 3 , $null) iplookup $strip($2) $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
  9.     }
  10.     if ($remove($strip($2),.) !isnum) {
  11.       set %ipchan $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
  12.       $iif($sock(iplook), .timer 1 3 , $null) .dns -h $strip($2)
  13.       ; }
  14.     }
  15.   }
  16. }
  17.  
  18. on *:sockopen:iplook: {
  19.   if ($sockerr) { msg -at Error While Looking Up IP }
  20. 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 }
  21.  
  22. on *:sockread:iplook: {
  23.   if ($sockerr) { msg -at Error While Looking Up IP }
  24.   var %read | sockread %read
  25.   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 }
  26.   if (*!*PAC* iswm %read) { set %ippac 1 }
  27.   if (%ippac) {
  28.     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) }
  29.     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) }
  30.   }
  31.   if (*/table></form* iswm %read) { unset %ippac }
  32.   if (*h2 id="Geolocation-Information* iswm %read) { set %geost 1 }
  33.   if (*Country:* iswm %read) { set %ipin.country $gettok($gettok(%read,$calc($findtok(%read,Country:</th,1,62) + 2),62),1,60) }
  34.   if (*City* iswm %read) { set %ipin.city $gettok($gettok(%read,$calc($findtok(%read,City:</th,1,62) + 2),62),1,60) }
  35.   if (*/table* iswm %read) && (%geost) {
  36.     unset %geost
  37.     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) )
  38.     sockclose $sockname
  39.     unset %ipin.* %ipchan %iplook %mon
  40.   }
  41. }
  42. alias dnsblcheck { var %x = 1 | while (%x <= $numtok(%dnsbl,32)) { .dns $+($rev($1),.,$gettok(%dnsbl,%x,32)) | inc %x } | }
  43. alias iplookup { set %ipchan $2 | set %iplook $+(/ip/,$1) |  $iif($sock(iplook), .timer 1 3 , $null) sockopen iplook whatismyipaddress.com 80 }
  44.  
  45.  
  46. on *:DNS: {
  47.   if (%ipchan) {
  48.     if ($raddress) {
  49.       iplookup $raddress %ipchan
  50.     }
  51.     elseif (!$raddress) {
  52.       echo %ipchan 3Error14: 7Hostname Could Not Be Resolved14.
  53.     }
  54.   }
  55. }
  56.  
  57. alias rev { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement