This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ip requests or !ip

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Arnold_X-P
Master
Posts: 247
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

ip requests or !ip

Post by Arnold_X-P »

Code: Select all

bind pub - .ip msg_ipwhois
proc msg_ipwhois {nick uhost hand chan text} {
  global botnick
  if {$text == "" } {putquick "PRIVMSG $chan :You have to use true command for look up whois information. Command: .ip ipnumber";return}
   if {[string match -nocase "*" $text]} {
  set connect [::http::geturl https://whatismyipaddress.com/ip/$text]
  set files [::http::data $connect]
  ::http::cleanup $files
  regexp -- {<p class="information"><span>Hostname:</span><span>(.+)</span>} $files - hostname
  regexp -- {<p class="information"><span>ISP:</span><span>(.+)</span>} $files - isp
  regexp -- {<p class="information"><span>State/Region:</span><span>(.+)</span>} $files - state
  regexp -- {<p class="information"><span>Country:</span><span>(.+)</span>} $files - country
  regexp -- {<p class="information"><span>City:</span><span>(.+)</span>} $files - city
  
   regexp -- {<p class="information"><span>Latitude:</span><span>(.+)</span>} $files - latitude
   regexp -- {<p class="information"><span>Longitude:</span><span>(.+)</span>} $files - longitude
 if {[info exists country]} {
  puthelp "privmsg $chan :IP: $text - ISP: $isp - Hostname: $hostname - Country: $country Latitude: $latitude Longitude: $longitude"
 if {[info exists state]} {
    puthelp "privmsg $chan :State: $state - City: $city"
  }

 } else {  puthelp "privmsg $chan :Invalid address or IP not found" }

   }
} 

This TCL doesn't work... just mention this on the channel

Code: Select all

 [23:52] <@Kantuta> Invalid address or IP not found

But when I go to the verification page, it works fine... it seems something is wrong with the TCL.

I'm not sure but the fault might come from here.

Code: Select all

 if {[string match -nocase "*" $text]} {  
Can you help me with the correction of this TCL please?
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls
User avatar
CrazyCat
Revered One
Posts: 1356
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: ip requests or !ip

Post by CrazyCat »

No, the trouble is that when you send the request, you first have a "just a moment..." page which is an anti-bot security.
You can't use this page without javascript
Post Reply