############################################################################################## ## ## Ipinfo.tcl for eggdrop by Ford_Lawnmower irc.geekshed.net #Script-Help ## ## ############################################################################################## ## To use this script you must set channel flag +ipinfo (ie .chanset #chan +ipinfo) ## ############################################################################################## ############################################################################################## ## ## Start Setup. ## ## ############################################################################################## ## Change the character between the "" below to change the command character/trigger. ## set Ipinfocmdchar "." proc Ipinfo {nick host hand chan search} { if {[lsearch -exact [channel info $chan] +ipinfo] != -1} { ## Change the format codes between the "" below to change the color/state of the text. ## set titlef "\0034" set textf "\003\002" ############################################################################################## ## ## End Setup. ## ## ############################################################################################## set Ipinfosite "www.melissadata.com" if {$search == ""} { putserv "PRIVMSG $chan :${textf}You must provide an ip address to check!" } else { set Ipinfourl "/lookups/iplocation.asp?ipaddress=${search}" if {[catch {set Ipinfosock [socket -async $Ipinfosite 80]} sockerr]} { putlog "$Ipinfosite $Ipinfourl $sockerr error" return 0 } else { puts $Ipinfosock "GET $Ipinfourl HTTP/1.0" puts $Ipinfosock "Host: $Ipinfosite" puts $Ipinfosock "User-Agent: Opera 9.6" puts $Ipinfosock "" flush $Ipinfosock while {![eof $Ipinfosock]} { set Ipinfovar " [gets $Ipinfosock] " if {[regexp {