<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/18612" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-09-08T14:12:41-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/18612</id>

		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-09-08T14:12:41-04:00</updated>

		<published>2013-09-08T14:12:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102025#p102025</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102025#p102025"/>
		<title type="html"><![CDATA[ip-to-country.tcl lastest: v0.9]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102025#p102025"><![CDATA[
what exactly are the requirements of this script?<br><div class="codebox"><p>Code: </p><pre><code>package require ip2cpackage require ip </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Sun Sep 08, 2013 2:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2011-08-28T06:33:36-04:00</updated>

		<published>2011-08-28T06:33:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97544#p97544</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97544#p97544"/>
		<title type="html"><![CDATA[ip-to-country.tcl lastest: v0.9]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97544#p97544"><![CDATA[
Fixed error no such var $lookup<br><div class="codebox"><p>Code: </p><pre><code>##  TCL scripts by Ofloo all rights reserved.##  HomePage: http://ofloo.net/#  CVS: http://cvs.ofloo.net/#  Email: support[at]ofloo.net##  This program is free software; you can redistribute it and/or#  modify it under the terms of the GNU General Public License#  as published by the Free Software Foundation; either version 2#  of the License, or (at your option) any later version.##  This program is distributed in the hope that it will be useful,#  but WITHOUT ANY WARRANTY; without even the implied warranty of#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the#  GNU General Public License for more details.##  You should have received a copy of the GNU General Public License#  along with this program; if not, write to the Free Software#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.###  Requires lib ip2c#  svn co https://narf.ofloo.net/svn/ip2c.tcl/trunk ip2c### Now supports ipv6 lookups, reserved ranges are returned with abbreviation ZZ#package require ip2cpackage require ip## Change the command trigger#set trigger "!ip2c"## Change the bind permissions#set permis "-|-"## Cookie list# %2 : Two letter country abbreveration# %3 : Tree letter country abbreveration# %c : Full country name# %i : IP# %a : Time allocated IP space# %r : Assinged registry#set message_format "Mapped IP \(\002%i\002\) to \(\002%c\002\)"## Error locate for input# %e : locate input#set error_format "No result found for \(\002%e\002\)"## DNS error# %i : Failed IP# %h : Failed host#set dns_format "Couldn't assosicate an ip with \(\002%h\002\)"## Time output format http://tcl.tk/man/tcl8.5/TclCmd/clock.htm#M26 for more information#set time_format {%D}##  DO NOT EDIT BELOW#set ip-to-country 0.9proc locate {chan arg}  {  global message_format error_format time_format  if {[ip2c::locate -ip $arg]} {    foreach {x} [split $message_format \n] {      if {[string equal {} $x]} {continue}      set i 0      foreach {n} [ip2c::abbr -short] {        array set short [list $i $n]        incr i      }      set i 0      foreach {n} [ip2c::abbr -long] {        array set long [list $i $n]        incr i      }      set i 0      foreach {n} [ip2c::country] {        array set country [list $i $n]        incr i      }      set i 0      foreach {n} [ip2c::country] {        array set country [list $i $n]        incr i      }      set i 0      foreach {n} [ip2c::assigned] {        array set assigned [list $i $n]        incr i      }      set i 0      foreach {n} [ip2c::registry] {        array set registry [list $i $n]        incr i      }      for {set i 0} {$i &lt; [llength [ip2c::assigned]]} {incr i} {        putserv "PRIVMSG $chan :[string trimleft [string map [list \          %2 $short($i) \          %3 $long($i) \          %c [join $country($i)] \          %i [ip2c::address] \          %a [clock format $assigned($i) -format [list $time_format]] \          %r $registry($i) \        ] $x]]"      }    }    ip2c::cleanup  } else {    foreach {x} [split $error_format \n] {      if {[string equal {} $x]} {continue}      putserv "PRIVMSG $chan :[string trimleft [string map [list %e $lookup] $x]]"    }  }}proc dns_callback {ip host status chan}  {  global dns_format  if {$status} {    locate $chan $ip  } else {    foreach {x} [split $dns_format \n] {      if {[string equal {} $x]} {continue}      putserv "PRIVMSG $chan :[string trimleft [string map [list %i $ip %h $host] $x]]"    }  }}proc ip2c_proc_pub {nick host hand chan arg}  {  set locate [lindex [split $arg] 0]  if {[ip::is ipv4 $locate] || [ip::is ipv6 $locate]} {    locate $chan $locate  } else {    if {[string equal {} $locate]} {      dnslookup [lindex [split [getchanhost $nick] @] end] dns_callback $chan    } else {      dnslookup [lindex [split [getchanhost $locate] @] end] dns_callback $chan    }  }}bind pub $permis $trigger ip2c_proc_pubputlog "Loaded ip-to-country script ${ip-to-country}"</code></pre></div>edit: latest version can be downloaded from <a href="http://ftp.ofloo.net/pub/scripts/" class="postlink">http://ftp.ofloo.net/pub/scripts/</a> once properly tested will be submited to tcl archieve.<br><br>ip2c lib upgraded to support data base upgrades with redirect to an other server.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Aug 28, 2011 6:33 am</p><hr />
]]></content>
	</entry>
	</feed>
