Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:*:#: {
- if ($1 == !ipinfo) {
- if (!$2) { .notice $nick Please specify a valid IP/Hostname | return }
- set %ipinfo $2
- sockopen ipinfo v2.api.iphub.info 80
- }
- }
- ON *:SOCKOPEN:ipinfo: {
- if ($sockerr) { echo -at Error While Looking Up IP | sockclose $sockname }
- sockwrite -nt $sockname GET $+(/ip/,%ipinfo) HTTP/1.1
- sockwrite -nt $sockname User-Agent: Mozilla/4.0
- sockwrite -nt $sockname Host: v2.api.iphub.info
- sockwrite -nt $sockname X-Key: MTExMzpSa2dJMTN4bWVYNldKZlRkOEhva0paRzdRM0c5b1J6Rw==
- sockwrite $sockname $crlf
- }
- ON *:SOCKREAD:ipinfo: {
- var %ipr
- sockread %ipr
- tokenize 58 %ipr
- if ($noqt($1) == block) {
- set %ipmsg $addtok(%ipmsg,Security: $ipblock($2),32)
- msg %ipchan %ipmsg
- unset %ipmsg %ipchan
- sockclose $sockname
- }
- set %ipmsg $addtok(%ipmsg,$remove($noqt($1-),$chr(44)),32)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement