ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Mon Aug 31, 2020 5:21 pm Post subject: Editing connect script to !whois |
|
|
So found this piece of code on this forum.
http://forum.egghelp.org/viewtopic.php?t=20844 << this page
| Code: |
package require http
package require json
set ExpChan "#opers"
bind raw - NOTICE Client_Connect
proc Client_Connect {from key arg} {
if {[string match *!*@* $from] || ![string match -nocase "*client connecting*" $arg]} { return }
if {[scan $arg %\[^\:\]\:%\[^(\](%\[^@\]@%\[^\)\] _ nick ident host] == "4"} {
set token [http::geturl http://ip-api.com/json/$host?fields=status,city,isp,country,query,regionName,countryCode]
set data [json::json2dict [http::data $token]]
::http::cleanup $token
if {[dict get $data status] eq "success"} {
puthelp "PRIVMSG $::ExpChan :\002Nick\002: $nick - \002IP\002: [dict get $data query] - \002Country\002: [dict get $data country] -\
\002City\002: [dict get $data city] - \002ISP\002: [dict get $data isp] [dict get $data countryCode]"
} else {
putcmdlog "Error! it fails to get data for this $host"
}
}
return 0
}
|
Possible to make this code show normal whois info on !whois And show the location of,
The ip.
Would be super appreciated if someone could edit this to do so, Thanks in advanced  _________________ ComputerTech |
|