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

	<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>2020-12-19T17:08:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Suratka]]></name></author>
		<updated>2020-12-19T17:08:00-04:00</updated>

		<published>2020-12-19T17:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109246#p109246</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109246#p109246"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109246#p109246"><![CDATA[
-NOTICE- *** Cannot send to #siamosolonoi: your message contains too many capital letters (93% &gt;= 50%)<br><br>????<br><br>helpme<br><div class="codebox"><p>Code: </p><pre><code>#############################################################    Oroscopo 1.3 tcl for eggdrop (13/06/2005)#    by lnx85 at #lnxlabs on Azzurra (irc.azzurra.org)#    E-mail: lnx85@lnxlabs.it##    Per attivare lo script è necessario impostare il flag "+oroscopo" al canale#    (.chanset #chan +oroscopo)############################################################### GLOBALS ###set oroscopo(version) 1.3package require httphttp::config -useragent "Mozilla/1.0"### END GLOBALS ###### FLAGS ###setudef flag oroscopo### END FLAGS###### BINDS ###bind pub - !oroscopo oroscopo: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: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 :\002\0034-\0035-\00314O\002roscopo HELP\002\0035:\002\00314 Mostra l'oroscopo per un dato segno zodiacale\       \037Utilizzo:\037 !oroscopo segno"       return   }   regsub -all -- " " $arg "%20" args   set url "http://www.oroscopi.com/oroscopo/oroscopo_giorno.php?segno=$args"   set http [ http::geturl $url ]   set html [ http::data $http ]   set flag 0if { [ regexp -nocase -- {&lt;p&gt;([^&lt;]+)&lt;/p&gt;} $html all segno testo ] } {    set risposta "\002\0034-\0035-\00314O\002roscopo \037[ string toupper $segno ]\037\002\0035:\002\00314 $testo"    set flag 1  }   if { $flag == 0 } {      putserv "PRIVMSG $chan :\002\0034-\0035-\00314O\002roscopo \037[ string toupper $segno ]\037\002\0035:\002\00314 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 ###### INITIAL ###putlog "\037OROSCOPO\037 \002::\002 \037LOADED\037 version $oroscopo(version) by lnx85"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12635">Suratka</a> — Sat Dec 19, 2020 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2020-09-10T03:49:54-04:00</updated>

		<published>2020-09-10T03:49:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108970#p108970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108970#p108970"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108970#p108970"><![CDATA[
it stopped working for me  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Thu Sep 10, 2020 3:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doni]]></name></author>
		<updated>2019-12-04T17:11:26-04:00</updated>

		<published>2019-12-04T17:11:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107958#p107958</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107958#p107958"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107958#p107958"><![CDATA[
i have fixed in this way:<div class="codebox"><p>Code: </p><pre><code>if { [ regexp -nocase -- {&lt;p&gt;([^&lt;]+)&lt;/p&gt;} $html all segno testo ] } {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12756">doni</a> — Wed Dec 04, 2019 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2019-12-03T19:04:59-04:00</updated>

		<published>2019-12-03T19:04:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107957#p107957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107957#p107957"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107957#p107957"><![CDATA[
Try using the following regex:<div class="codebox"><p>Code: </p><pre><code>(?Us)&lt;div class="oroscopo"&gt;.+&lt;h1&gt;(.+)&lt;span.+&lt;p&gt;([^&lt;]+)&lt;/p&gt;</code></pre></div>Not sure on how tcl interprets the (?Us), but it works on regex101: <a href="https://regex101.com/r/gim0ua/1" class="postlink">https://regex101.com/r/gim0ua/1</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 03, 2019 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doni]]></name></author>
		<updated>2019-12-03T14:24:25-04:00</updated>

		<published>2019-12-03T14:24:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107956#p107956</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107956#p107956"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107956#p107956"><![CDATA[
<blockquote class="uncited"><div>The template of the page has changed.<br>May work with something like:<div class="codebox"><p>Code: </p><pre><code>if { [ regexp -nocase -- {&lt;div class="oroscopo"&gt;.+&lt;h1&gt;(.+)&lt;span.+&lt;p&gt;([^&lt;]+)&lt;/p&gt;} $html all segno testo ] } {</code></pre></div></div></blockquote>reply is empty:<br><div class="codebox"><p>Code: </p><pre><code>[19:18:11] &lt;@doni&gt; !oroscopo vergine[19:18:12] &lt;Toolz&gt; --Oroscopo VERGINE: </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12756">doni</a> — Tue Dec 03, 2019 2:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2019-12-03T04:27:39-04:00</updated>

		<published>2019-12-03T04:27:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107954#p107954</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107954#p107954"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107954#p107954"><![CDATA[
The template of the page has changed.<br>May work with something like:<div class="codebox"><p>Code: </p><pre><code>if { [ regexp -nocase -- {&lt;div class="oroscopo"&gt;.+&lt;h1&gt;(.+)&lt;span.+&lt;p&gt;([^&lt;]+)&lt;/p&gt;} $html all segno testo ] } {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 03, 2019 4:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doni]]></name></author>
		<updated>2019-12-03T02:44:53-04:00</updated>

		<published>2019-12-03T02:44:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107953#p107953</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107953#p107953"/>
		<title type="html"><![CDATA[Horoscope tcl error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107953#p107953"><![CDATA[
Hi guys!<br><br>I get this error in PL:<div class="codebox"><p>Code: </p><pre><code> Tcl error [oroscopo:request]: can't read "segno": no such variable </code></pre></div>Someone can help me, please?<br><div class="codebox"><p>Code: </p><pre><code>#############################################################    Oroscopo 1.3 tcl for eggdrop (13/06/2005)#    by lnx85 at #lnxlabs on Azzurra (irc.azzurra.org)#    E-mail: lnx85@lnxlabs.it##    Per attivare lo script è necessario impostare il flag "+oroscopo" al canale #    (.chanset #chan +oroscopo)############################################################### GLOBALS ###set oroscopo(version) 1.3 package require httphttp::config -useragent "Mozilla/1.0"### END GLOBALS ###### FLAGS ###setudef flag oroscopo### END FLAGS###### BINDS ###bind pub - !oroscopo oroscopo: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: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 :\002\0034-\0035-\00314O\002roscopo HELP\002\0035:\002\00314 Mostra l'oroscopo per un dato segno zodiacale\ \037Utilizzo:\037 !oroscopo segno" return}regsub -all -- " " $arg "%20" argsset url "http://www.oroscopi.com/oroscopo/oroscopo_giorno.php?segno=$args"set http [ http::geturl $url ]set html [ http::data $http ]set flag 0  if { [ regexp -nocase -- {&lt;font face="Verdana"  size="2"&gt;&lt;b&gt;([^&lt;]+)&lt;/b&gt; &lt;br&gt;([^&lt;]+)&lt;/td&gt;} $html all segno testo ] } {    set risposta "\002\0034-\0035-\00314O\002roscopo \037[ string toupper $segno ]\037\002\0035:\002\00314 $testo"    set flag 1  }if { $flag == 0 } {putserv "PRIVMSG $chan :\002\0034-\0035-\00314O\002roscopo \037[ string toupper $segno ]\037\002\0035:\002\00314 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 ###### INITIAL ###putlog "\037OROSCOPO\037 \002::\002 \037LOADED\037 version $oroscopo(version) by lnx85"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12756">doni</a> — Tue Dec 03, 2019 2:44 am</p><hr />
]]></content>
	</entry>
	</feed>
