Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l mychan { return #opers }
- ON *:TEXT:!ip *:$($mychan): { ip_find $nick $2 }
- ON *:INPUT:*: {
- if (!$inpaste) && (!$ctrlenter) && ($comchar !== $left($1,1)) && ($active == $mychan) && ($active !== Status Window) && ($1 == !ip) && ($2) { .timer 1 0 ip_find $unsafe($me $2) }
- }
- alias ip_find {
- if (!$1) && (!$2) { return }
- if (!$iptype($2)) { msg $chan ( $+ $nick $+ ): Error, Invalid IP address! | return }
- var %n = $1
- var %u = http://ipinfo.io/ $+ $2 $+ ?token=f3e8ece60257d6
- var %v = IPINFO_ $+ $ticks $+ $rand(1,100000000)
- JSONOpen -ud %v %u
- if ($JSONError) { msg $chan ( $+ %n $+ ): Error, Connection Problem! - Error Details: $jsonerror | return }
- var %h = $json(%v,hostname).value
- var %y = $json(%v,city).value
- var %r = $json(%v,region).value
- var %c = $json(%v,country).value
- var %l = $json(%v,loc).value
- var %p = $json(%v,postal).value
- var %z = $json(%v,timezone).value
- var %asn = $json(%v,asn,asn).value
- var %asn_name = $json(%v,asn,name).value
- var %asn_domain = $json(%v,asn,domain).value
- var %asn_route = $json(%v,asn,route).value
- var %asn_type = $json(%v,asn,type).value
- var %vpn = $json(%v,privacy,vpn).value
- var %proxy = $json(%v,privacy,proxy).value
- var %tor = $json(%v,privacy,tor).value
- var %hosting = $json(%v,privacy,hosting).value
- msg $chan ( $+ %n $+ ): Hostname: $iif(%h,$v1,N/A)
- msg $chan ( $+ %n $+ ): City: $iif(%y,$v1,N/A)
- msg $chan ( $+ %n $+ ): Region: $iif(%r,$v1,N/A)
- msg $chan ( $+ %n $+ ): Country Code: $iif(%c,$v1,N/A)
- msg $chan ( $+ %n $+ ): Location: $iif(%l,$v1,N/A)
- msg $chan ( $+ %n $+ ): Postal Code: $iif(%p,$v1,N/A)
- msg $chan ( $+ %n $+ ): TimeZone: $iif(%z,$v1,N/A)
- msg $chan ( $+ %n $+ ): ASN Number: $iif(%asn,$v1,N/A)
- msg $chan ( $+ %n $+ ): ASN Name: $iif(%asn_name,$v1,N/A)
- msg $chan ( $+ %n $+ ): ASN Domain: $iif(%asn_domain,$v1,N/A)
- msg $chan ( $+ %n $+ ): ASN Route: $iif(%asn_route,$v1,N/A)
- msg $chan ( $+ %n $+ ): ASN Type: $iif(%asn_type,$v1,N/A)
- msg $chan ( $+ %n $+ ): VPN: $iif(%vpn,Yes,No)
- msg $chan ( $+ %n $+ ): Proxy: $iif(%proxy,Yes,No)
- msg $chan ( $+ %n $+ ): TOR: $iif(%tor,Yes,No)
- msg $chan ( $+ %n $+ ): Hosting: $iif(%hosting,Yes,No)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement