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

	<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-03-08T04:21:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Kaa]]></name></author>
		<updated>2013-03-08T04:21:01-04:00</updated>

		<published>2013-03-08T04:21:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101186#p101186</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101186#p101186"/>
		<title type="html"><![CDATA[Problem meteo.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101186#p101186"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code> meteo-0.2.tcl for eggdrop (05/11/2002)# by elf- at #egghelp on AzzurraNet (irc.azzurra.org)## per attivare lo script è necessario impostare il flag +meteo al canale (.chanset #chan +meteo)set meteo_version 0.2bind pub - !meteo meteo:requestsetudef flag meteopackage require httphttp::config -useragent "Mozilla/1.0"proc meteo:request { nick uhost hand chan arg } {if { [ lsearch -exact [ channel info $chan ] "+meteo" ] == -1 } { return }putlog "METEO :: request \"!meteo $arg\" from $nick!$uhost on $chan"if { $arg == "" || $arg == "help" } { putserv "privmsg $chan :\002\0034-\0035-\00314M\002eteo HELP\002\0035:\002\00314 Visualizza tempo e temperature minime/massime\ di una città. Uso: \002!meteo città\002" return} elseif { [ string length $arg ] &lt; 3 } {putserv "privmsg $chan :\002\0034-\0035-\00314M\002eteo\002\0035:\002\00314 La città *non* può essere inferiore ai 3 caratteri."return}regsub -all -- " " $arg "%20" argsset url "http://meteo.ansa.it/ricerca.asp?cerca=$args"set http [ http::geturl $url ]upvar #0 $http stateforeach { name value } $state(meta) {if { [ regexp -nocase -- ^location$ $name ] } {set url "http://meteo.ansa.it/$value" }} set http [ http::geturl $url ]set html [ http::data $http ]foreach line [ split $html "\n" ] {if { [ regexp -nocase -- {&lt;td height\=\"20\" bgcolor\=.*&lt;a href\=\"(.*)\" class\=\"menu\"&gt;(.*)&lt;/a&gt;&lt;/td&gt;}\$line all rif citta ] } {if { [ regexp -nocase -- .*${arg}.* $citta ] } {regsub -- {amp;} $rif "" rifset url "http://meteo.ansa.it/$rif"break}}}set flag 0set min_max {}set http [ http::geturl $url ]set html [ http::data $http ]foreach line [ split $html "\n" ] {if { [ regexp -nocase -- {\"&gt;&lt;a href\=\"(.*)\" class\=\"menu\"&gt;(.*)&lt;/a&gt;&lt;/td&gt;$}$line all rif citta ] } {if { [ regexp -nocase -- .*${arg}.* $citta ] } { set flag 1 }} elseif { [ regexp -- {\s+(.?\d+)&lt;/div&gt;} $line all minmax ] &amp;&amp; ( $flag == 1 ) } {lappend min_max $minmax} elseif { [ regexp -- {\s+&lt;div ALIGN\=\"right\"&gt;&lt;img SRC\=\"images\/simbolipiccoli.*ALT\=\"(.*)\"&gt;&lt;/div&gt;}\$line all tempo ] &amp;&amp; ( $flag == 1 ) } {break} elseif { [ regexp -- {&lt;small&gt;&lt;small&gt; (.+)&lt;/small&gt;&lt;/small&gt;&lt;/font&gt;&lt;/td&gt;&lt;td align\=\"right\"&gt;}\$line all regione ] } { continue }}if { [ info exists regione ] &amp;&amp; [ info exists citta ] } {if { [ llength $min_max ] == 2 } {putserv "privmsg $chan \002\0034-\0035-\00314M\002eteo $regione\002\0035:\002\00314 A \002$citta\002 il tempo è\[ string tolower $tempo], minima [ lindex $min_max 0 ] massima [ lindex $min_max 1 ]"} else {putserv "privmsg $chan :\002\0034-\0035-\00314M\002eteo $regione\002\0035:\002\00314 A \002$citta\002 il tempo è\[ string tolower $tempo]"}} else {putserv "privmsg $chan :\002\0034-\0035-\00314M\002eteo\002\0035:\002\00314 \037$arg\037 città non trovata."}}putlog "METEO :: version $meteo_version loaded"</code></pre></div>I have problems with this tcl. I get no response from the tcl and even errors in pl. The author has disappeared. Can you help me to run the tcl? Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9415">Kaa</a> — Fri Mar 08, 2013 4:21 am</p><hr />
]]></content>
	</entry>
	</feed>
