<?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/19443" />

	<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-06-22T05:47:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Hero]]></name></author>
		<updated>2013-06-22T05:47:19-04:00</updated>

		<published>2013-06-22T05:47:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101712#p101712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101712#p101712"/>
		<title type="html"><![CDATA[Ip location]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101712#p101712"><![CDATA[
Error!!<br><div class="codebox"><p>Code: </p><pre><code>[14:46:57] Tcl error [ip:main]: syntax error in expression "[string index $arg 0] in $temp(trigger)": extra tokens at end of expression</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12019">Hero</a> — Sat Jun 22, 2013 5:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-06-12T09:15:37-04:00</updated>

		<published>2013-06-12T09:15:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101660#p101660</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101660#p101660"/>
		<title type="html"><![CDATA[Ip location]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101660#p101660"><![CDATA[
I saw that alot where looking for a still working ip location script as the old ones were outdated so here is my version.<br><div class="codebox"><p>Code: </p><pre><code>#### ++++ Author: MadaliN &lt;madalinmen28@yahoo.com&gt;### +++ Website: www.Ascenture.ro## +++ TCL Name: IP Location# +++ Version: 1.0## ++++# Commands:#!ip 45.432.12.1## IMPORTANT#- You need TDOM installed on your system#- You need to create an API key so that the script will work. For that visit http://ipinfodb.com/register.php##########You need to be atleast VOICE or OP in the channel########bind PUBM - * ip:mainset temp(apikey) "179e8e059f0c9a5c519dc1021ef4aaadbefeb1316857066d1ad02e2baf959279"set temp(trigger) {! . `}package require httppackage require tdomproc ip:main {nick uhost hand chan arg} {global tempif {[string index $arg 0] in $temp(trigger)} {set temp(cmd) [string range $arg 1 end]set temp(cmd) [lindex [split $temp(cmd)] 0]set arg [join [lrange [split $arg] 1 end]]} elseif {[isbotnick [lindex [split $arg] 0]]} {set temp(cmd) [lindex [split $arg] 1]set arg [join [lrange [split $arg] 2 end]]} else { return 0 }if {[info commands command:$temp(cmd)] != ""} { command:$temp(cmd) $nick $uhost $hand $chan $arg }}proc command:ip {nick uhost hand chan arg} {global top tempif {[isvoice $nick $chan] || [isop $nick $chan]} {set ip [lindex [split $arg] 0]if {![regexp {^(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])(\.|$)){4}$} $ip]} { putserv "PRIVMSG $chan :\002$nick\002 -  NO/Invalid IP pattern. USAGE: !ip 193.193.193.193"; return }set token [http::config -useragent Mozilla]set token [http::geturl "http://api.ipinfodb.com/v2/ip_query.php?key=$temp(apikey)&amp;ip=$ip"]set data [::http::data $token]::http::cleanup $tokenset XML $dataset doc [dom parse $XML]set root [$doc documentElement]set code [$root selectNodes CountryCode]set code [$code asText]set country [$root selectNodes CountryName]set country [$country asText]set regionname [$root selectNodes RegionName]set regionname [$regionname asText]set city [$root selectNodes City]set city [$city asText]set latitude [$root selectNodes Latitude]set latitude [$latitude asText]set longitude [$root selectNodes Longitude]set longitude [$longitude asText]putserv "PRIVMSG $chan :\002$nick\002 - Informations about \00304$arg\003: Country Code - \00312$code\003, Country Name - \00312$country\003, Region Name - \00312$regionname\003, City - \00312$city\003 (Latitude \00303$latitude\003 Longitude \00303$longitude\003)"}}putlog "++ Succesfully loaded: \00312Ip Location"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Wed Jun 12, 2013 9:15 am</p><hr />
]]></content>
	</entry>
	</feed>
