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

	<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>2014-02-25T01:11:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Kaa]]></name></author>
		<updated>2014-02-25T01:11:19-04:00</updated>

		<published>2014-02-25T01:11:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102609#p102609</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102609#p102609"/>
		<title type="html"><![CDATA[problem tcl horoscope]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102609#p102609"><![CDATA[
The author is gone and doesn't respond to emails.<div class="codebox"><p>Code: </p><pre><code>### GLOBALS ###set oroscopo(version) 1.5package require httphttp::config -useragent "Mozilla/1.0"### END GLOBALS ###### FLAGS ###setudef flag oroscopo### END FLAGS###### BINDS ###bind pub - !oroscopo oroscopo:requestbind msgm - * oroscopo:pvt:request### END BINDS ###### PROCS ###proc strlastpos { string char {max 0} } {        if { $max == 0} { set max [ string length $string ] }        if { [ string length $string ] &lt;= $max } { return [ string length $string ] }        for { set i 0 } { $i &lt; $max } { incr i } {                if { [ string index $string [ expr $max - $i ] ] == $char } {                        return [ expr $max - $i ]                }        }        return $max}proc max:privmsg:chars { target } {        return [ expr 500 - 1 - [ string length $::nick ] - 30 - [ string length $target ] - 2 ]}proc oroscopo:pvt:request { nick uhost hand arg } {        set arg [ lindex $arg 0 ]        if { [ lsearch -exact {ariete toro gemelli cancro leone vergine bilancia scorpione sagittario capricorno acquario pesci} [ string tolower $arg ] ] == -1 } { return }        regsub -all -- " " $arg "%20" args        set url "http://it.horoscopofree.com/rss/horoscopofree-it.rss"        set http [ http::geturl $url ]        set html [ http::data $http ]        set flag 0        if { [ regexp -nocase -all -- "&lt;item&gt;\[^&lt;\]*&lt;title&gt;($arg)&lt;/title&gt;\[^&lt;\]*&lt;link&gt;\[^&lt;\]*&lt;/link&gt;\[^&lt;\]*&lt;guid \[^&lt;\]*&lt;/guid&gt;\[^&lt;\]*&lt;description&gt;&lt;!\[^a-z\]CDATA\[^a-z\](\[^&lt;\]*?)" $html all segno testo ] } {                set testosegno [lindex $testo [lsearch -exact $segno $args]]                set risposta "\037OROSCOPO\037 \002::\002 \037[ string toupper $args ]\037 $testo"                set flag 1        }        if { $flag == 0 } {                putserv "PRIVMSG $nick :\037OROSCOPO\037 \002::\002 \037[strupr $arg]\037 Segno zodiacale non trovato"        } else {                set max_chars [ max:privmsg:chars $nick ]                while { [ string length $risposta ] &gt; 0 } {                        set limit [ strlastpos $risposta " " $max_chars ]                        set risptemp [ string range $risposta 0 $limit ]                        set risposta [ string range $risposta $limit end ]                        if { [ string length $risposta ] != 0 } {                                putserv "PRIVMSG $nick :$risptemp ..."                        } else {                                putserv "PRIVMSG $nick :$risptemp"                        }                }        }}proc oroscopo:request { nick uhost hand chan arg } {        if { [ lsearch -exact [ channel info $chan ] "+oroscopo" ] == -1 } { return }        putlog "OROSCOPO :: request \"!oroscopo $arg\" from $nick!$uhost on $chan"        if { $arg == "" || $arg == "help" } {                 putserv "NOTICE $nick :\037OROSCOPO\037 \002::\002 \037HELP\037 Mostra l'oroscopo per un dato segno zodiacale\037Utilizzo:\037 !oroscopo segno"                 return        }        regsub -all -- " " $arg "%20" args        set url "http://it.horoscopofree.com/rss/horoscopofree-it.rss"        set http [ http::geturl $url ]        set html [ http::data $http ]        set flag 0        if { [ regexp -nocase -all -- "&lt;item&gt;\[^&lt;\]*&lt;title&gt;($arg)&lt;/title&gt;\[^&lt;\]*&lt;link&gt;\[^&lt;\]*&lt;/link&gt;\[^&lt;\]*&lt;guid \[^&lt;\]*&lt;/guid&gt;\[^&lt;\]*&lt;description&gt;&lt;!\[^a-z\]CDATA\[^a-z\](\[^&lt;\]*?)" $html all segno testo ] } {                set testosegno [lindex $testo [lsearch -exact $segno $args]]                set risposta "\037OROSCOPO\037 \002::\002 \037[ string toupper $args ]\037 $testo"                set flag 1        }        if { $flag == 0 } {                putserv "PRIVMSG $chan :\037OROSCOPO\037 \002::\002 \037[strupr $arg]\037 Segno zodiacale non trovato"        } else {                set max_chars [ max:privmsg:chars $chan ]                while { [ string length $risposta ] &gt; 0 } {                        set limit [ strlastpos $risposta " " $max_chars ]                        set risptemp [ string range $risposta 0 $limit ]                        set risposta [ string range $risposta $limit end ]                        if { [ string length $risposta ] != 0 } {                                putserv "PRIVMSG $chan :$risptemp ..."                        } else {                                putserv "PRIVMSG $chan :$risptemp"                        }                }        }}### END PROCS ###</code></pre></div>The problem is that the tcl show bad hyphenated words. Can you help me? I don't know where to fix. please. Thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9415">Kaa</a> — Tue Feb 25, 2014 1:11 am</p><hr />
]]></content>
	</entry>
	</feed>
