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

	<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>2021-04-23T02:43:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Goga]]></name></author>
		<updated>2021-04-23T02:43:06-04:00</updated>

		<published>2021-04-23T02:43:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109771#p109771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109771#p109771"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109771#p109771"><![CDATA[
Simo Sir, <br>Can you please remove 'SEX' part in this Horoscope? <br><br>14Your general mood : Sex 07★07★07★14☆14☆<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12883">Goga</a> — Fri Apr 23, 2021 2:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2021-04-20T13:15:10-04:00</updated>

		<published>2021-04-20T13:15:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109761#p109761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109761#p109761"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109761#p109761"><![CDATA[
thats even better thanks SpiKe^^ that works well<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Apr 20, 2021 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2021-04-19T23:25:40-04:00</updated>

		<published>2021-04-19T23:25:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109756#p109756</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109756#p109756"/>
		<title type="html"><![CDATA[or this:)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109756#p109756"><![CDATA[
or try this somewhat shorter method...<br><div class="codebox"><p>Code: </p><pre><code>variable HoroList [list aries taurus gemini cancer leo virgo libra scorpio sagittarius capricorn aquarius pisces]bind pubm $HoroCmdFlags "#% !%" [namespace current]::HorosPubProcAnyproc HorosPubProcAny {nick uhost hand chan arg} {  set arg [string tolower [string trim $arg "!"]]  if {$arg ni $Horoscope::HoroList} { return 0 }  HorosPubProcName $nick $uhost $hand $chan $arg}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Apr 19, 2021 11:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2021-04-19T20:11:45-04:00</updated>

		<published>2021-04-19T20:11:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109755#p109755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109755#p109755"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109755#p109755"><![CDATA[
thanks spike^^ that seems to do it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Apr 19, 2021 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2021-04-19T19:28:49-04:00</updated>

		<published>2021-04-19T19:28:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109754#p109754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109754#p109754"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109754#p109754"><![CDATA[
simo:  maybe something like this, 12 times:)<br><div class="codebox"><p>Code: </p><pre><code>bind pub $HoroCmdFlags !aries [namespace current]::HorosPubProcAriesproc HorosPubProcAries {nick uhost hand chan arg} {  HorosPubProcName $nick $uhost $hand $chan aries}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Apr 19, 2021 7:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2021-04-19T17:33:37-04:00</updated>

		<published>2021-04-19T17:33:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109753#p109753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109753#p109753"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109753#p109753"><![CDATA[
anyway to have this edited to use like <br><br>!aries<br><br>!taurus <br><br>and so on<br><br>instead of the default :<br><br>!horoscope taurus<br><br>!horoscope aries<br><br>and so on<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Apr 19, 2021 5:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[albozz]]></name></author>
		<updated>2021-02-01T06:24:53-04:00</updated>

		<published>2021-02-01T06:24:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109379#p109379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109379#p109379"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109379#p109379"><![CDATA[
Help me please to make this link <a href="https://top-channel.tv/horoskopi/" class="postlink">https://top-channel.tv/horoskopi/</a> for horoscope<br>Thnx..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12640">albozz</a> — Mon Feb 01, 2021 6:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-01-14T19:08:50-04:00</updated>

		<published>2021-01-14T19:08:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109342#p109342</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109342#p109342"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109342#p109342"><![CDATA[
I think it's a trouble with update of tcllib, but I don't know CentOS so I can't give you the commands to upgrade your system.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jan 14, 2021 7:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Klamatiel]]></name></author>
		<updated>2021-01-13T20:56:59-04:00</updated>

		<published>2021-01-13T20:56:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109341#p109341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109341#p109341"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109341#p109341"><![CDATA[
Hi! Can someone update/modify it for CentOS7? I'm a noob at Linux but i have tcltls 1.7.20 and tcl 8.5.13. Thanks.<br><br>Tcl error in file 'eggdrop.conf':<div class="codebox"><p>Code: </p><pre><code>couldn't load file "/usr/lib64/tcl8.5/tcltls1.7.20/tcltls.so": /usr/lib64/tcl8.5/tcltls1.7.20/tcltls.so: undefined symbol: DH_set0_pqg    while executing"load [file join $dir tcltls.so] Tls"    (lambda term "{dir} {                if {{shared} eq "static"} {                        load {} Tls                } els..." line 5)    invoked from within"apply {{dir} {                if {{shared} eq "static"} {                        load {} Tls                } else {                        load [file join $dir tcltls.so] Tls                }                set tlsTclInitScript [file join $..."    ("package ifneeded tls 1.7.20" script)    invoked from within"package require tls 1.6.7"    (file "scripts/h.tcl" line 4)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12896">Klamatiel</a> — Wed Jan 13, 2021 8:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2019-09-20T12:27:55-04:00</updated>

		<published>2019-09-20T12:27:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107833#p107833</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107833#p107833"/>
		<title type="html"><![CDATA[Re: TLS &amp; HTTP Package Require]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107833#p107833"><![CDATA[
<blockquote class="uncited"><div>How to install these tls or http packages in eggdrop ??</div></blockquote>I think that both are now included in tcllib.    It might be libtcl ...  I can never remember which.<br><br>Are you using Debian or Ubuntu?  <br>If so,  try :<br>dpkg -l *tcl* | grep ii<br>to see a list of everything tcl that is currently installed on the system.<br><br>I've just now tried it myself on a shell of mine, and got lucky.<br>Here's one line I see:<div class="codebox"><p>Code: </p><pre><code>ii  libtcl8.6:amd64  8.6.9+dfsg-2 amd64        Tcl (the Tool Command Language) v8.6 - run-time library files</code></pre></div>Lucky, because I don't see a line that look like it would be <br>tcllib<br>and !  ...  the bot on this shell has both tls and http available to it.<br>So,  in regards to my first statement above - it appears that libtcl is the one you want.<br><br>However, something else came to mind.   I think that may cover only the http package.<br>The more I think about it,   I think that TLS comes with openssl.<br>So, do:<br>dpkg -l *ssl* | grep ii<br>to see what is installed regarding ssl, on your shell.<br><br>I usually find that root access is not necessary to simply view these things.<br><br><br>You can check to see what is available to your bot, without having to load a script that will need one of those, and perhaps crashing your bot if either is not available.<br><br>First, be sure that the use of the <br>.tcl<br>command is available for your (owner's) use, in the partyline.  This is done in eggdrop.conf .<br>Then do:<br>.tcl package names<br>to get a list of packages loaded.   (  reference:  <a href="http://www.tcl.tk/man/tcl8.6/TclCmd/package.htm#M7" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/package.htm#M7</a>  )<br><br>To try to load a package, for example, do:<br>.tcl package require http<br>and see what happens.<br>Just do another:<br>.tcl package names    <br>to see if http is now in the list.<br>You can do:<br>.tcl package forget http<br>to unload it, if you wish.<br><br>Same for tls .<br><br>That command:<br>package require<br>is the literal answer to your original question.  That command will load a package - if available - into eggdrop.  You'll find that command in tcl scripts that use the http package.<br><br><br><br>If you find that either libtcl or openssl  are not installed on your shell's system,  that will likely require root access to be able to install either.<br>Both are available via apt get  and take just seconds to install.<br>If you can't do it, you'll have to ask the system administrator to do it for you.<br><br>There *IS* an http.tcl  script out there, somewhere.  I think it was necessary,  in the past, before the http package was available as I've tried to describe above.<br>In the past, I've used it, too.   It is probably mentioned somewhere in this forum,  or perhaps google would find it.<br>I cannot say which is "best", though I suspect it would be to install via apt get, with libtcl.<br><br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Sep 20, 2019 12:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Brut]]></name></author>
		<updated>2019-09-20T01:14:14-04:00</updated>

		<published>2019-09-20T01:14:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107832#p107832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107832#p107832"/>
		<title type="html"><![CDATA[TLS &amp; HTTP Package Require]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107832#p107832"><![CDATA[
How to install these tls or http packages in eggdrop ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12821">Brut</a> — Fri Sep 20, 2019 1:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dominatez]]></name></author>
		<updated>2019-08-05T00:02:17-04:00</updated>

		<published>2019-08-05T00:02:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107741#p107741</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107741#p107741"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107741#p107741"><![CDATA[
Thanks Heartbroken,<br><br>Confirming that this works like a charm now on the latest eggdrop.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12783">Dominatez</a> — Mon Aug 05, 2019 12:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2019-07-26T02:02:40-04:00</updated>

		<published>2019-07-26T02:02:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107725#p107725</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107725#p107725"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107725#p107725"><![CDATA[
htmlparse using struct::stack and cmdline packages from tcllib . <br><br>try to source it like this : <a href="http://paste.tclhelp.net/?id=6g75" class="postlink">http://paste.tclhelp.net/?id=6g75</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Fri Jul 26, 2019 2:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2019-07-26T00:02:02-04:00</updated>

		<published>2019-07-26T00:02:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107724#p107724</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107724#p107724"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107724#p107724"><![CDATA[
it doesn't work on windrop 6.21 tcl 8.5<br>I load the tcl from htmlparse<br>and it generates error...<br><br><strong class="text-strong">htmlparse 1.0</strong><br><a href="https://opensource.apple.com/source/tcl/tcl-20/tcl_ext/tcllib/tcllib/modules/htmlparse/htmlparse.tcl.auto.html" class="postlink">https://opensource.apple.com/source/tcl ... .auto.html</a><br>or<br><strong class="text-strong">htmlparse 1.2.2</strong> <br><a href="https://github.com/tcltk/tcllib/blob/master/modules/htmlparse/htmlparse.tcl" class="postlink">https://github.com/tcltk/tcllib/blob/ma ... lparse.tcl</a><br><br>which of the two tcl would you use for windrop 6.21 and tcl 8.5<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Fri Jul 26, 2019 12:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2021-04-20T23:48:08-04:00</updated>

		<published>2019-07-24T09:09:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107722#p107722</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107722#p107722"/>
		<title type="html"><![CDATA[Updated horoscope pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107722#p107722"><![CDATA[
Updated,  Thank you!<br><br><a href="https://ibb.co/6JqvQRj" class="postlink"><img src="https://i.ibb.co/5xJYZWb/8-6.png" class="postimage" alt="Image"></a><br><br>This one for Tcl8.6:<br> <div class="codebox"><p>Code: </p><pre><code># This script using some of Tcl8.6's commands,also needs Tcl-TLS for https links and tcllib for fixed outputs!  package require http  package require htmlparse  package require tls 1.6.4  package require textutil::split  package present Tcl 8.6  package require eggdrop 1.8  # to activate on your #channel : .chanset #channel +Horoscope in PartyLine  setudef flag Horoscope  namespace eval Horoscope {      # You can add multiple Horoscope commands with a space between.     variable HoroCMD ".horo !horo !horoscope"          # Would you like to use this script commands in your bot's pvt?     # 1 yes , 0 no     variable HoroEggPM 1          # users able to make horo queries in seconds:times     variable FludControl 10:3          # eggdrop user flags : general flags|channel flags     variable HoroCmdFlags -|-         # How many chars would allow to print in a line     variable HoroCharsInLineLen 312          # daily horo query link     variable DailyHoroURL {https://www.horoscope.com/us/horoscopes/general/horoscope-general-daily-today.aspx}          # rating stars regexp     variable HoroStarsRE {star-ratings\"&gt;.+?&lt;/div&gt;(.+?)&lt;/div&gt;}          # daily horoscope regexp     variable HoroDailyRE {&lt;p&gt;&lt;strong&gt;(.*?)&lt;/p&gt;}          # matches regexp     variable HoroMatchesRE {&lt;h3&gt;(.*?)&lt;/h3&gt;.+?love.+?&gt;(.*?)&lt;/p&gt;.+?friend.+?&gt;(.*?)&lt;/p&gt;.+?career.+?&gt;(.*?)&lt;/p&gt;}          # for filled star highlight     variable UnicodeBlackStar \u2605          # for filled star outputs     variable UnicodeWhiteStar \u2606          # connection timeout time in seconds     variable TimeOutHoro 12          # ratings title:     variable MoodRatings "\00314Today's Star Ratings - Your general mood\003"     # end of settings          foreach CmdSign [split $HoroCMD { }] {        bind pub $HoroCmdFlags $CmdSign [namespace current]::HorosPubProcName        if {$HoroEggPM &gt;= 1 &amp;&amp; [string length $HoroEggPM]} {           bind msg $HoroCmdFlags $CmdSign [namespace current]::EggPvtHorosProcName        }     };     putlog "[file tail [info script]] Loaded!"     namespace path {::http:: ::htmlparse:: ::textutil::split::}     register https 443 [list tls::socket -ssl2 0 -ssl3 0 -tls1 1]     proc MainHoroProcName {nick uhost hand chan text} {        variable FludControl ;        set TargetHost [lindex [split $uhost @] 1]        if {![info exists ::HoroFludVar($TargetHost)] &amp;&amp; ![info exists ::HoroFludVar($nick)]} {           array set ::HoroFludVar [list $nick [clock seconds] $TargetHost 0]        } else {           incr ::HoroFludVar($TargetHost)        }        if {([expr {[clock seconds] - $::HoroFludVar($nick)}] &lt;= [lindex [split $FludControl :] 0]) &amp;&amp; ($::HoroFludVar($TargetHost) &gt;= [lindex [split $FludControl :] 1])} {           putserv "NOTICE $nick :$nick You able to use $::lastbind command [lindex [split $FludControl :] 1] times in [lindex [split $FludControl :] 0] seconds!";           return 0;        }        utimer [lindex [split $FludControl :] 0] [list unset -nocomplain ::HoroFludVar($TargetHost) ::HoroFludVar($nick)]        set HoroRequest [lindex [split [stripcodes * [string tolower $text]]] 0]        set ListOfHoros [dict create aries 1 taurus 2 gemini 3 cancer 4 leo 5 virgo 6 libra 7 scorpio 8 sagittarius 9 capricorn 10 aquarius 11 pisces 12]        if {![llength $HoroRequest]} {           putserv "NOTICE $nick :Usage: $::lastbind &lt;Horoscope&gt;";           return 0        } elseif {$HoroRequest ni [dict keys $ListOfHoros]} {           putserv "NOTICE $nick :\"$HoroRequest\" is not valid!";           return        } else {           set HoroWhatWeGot [::Horoscope::FetchDisHoros ${Horoscope::DailyHoroURL}?sign=[dict get $ListOfHoros $HoroRequest]]           if {[regexp -- $Horoscope::HoroDailyRE $HoroWhatWeGot -&gt; TodaysHoro]} {              ::Horoscope::PrintHoro $chan [::Horoscope::HoroCleanUp $TodaysHoro]           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroDailyRE";           }           if {[regexp -- $Horoscope::HoroStarsRE $HoroWhatWeGot -&gt; HiLightStars]} {              puthelp "PRIVMSG $chan :$Horoscope::MoodRatings : [::Horoscope::HoroCleanUp $HiLightStars]";           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroStarsRE";           }           if {[regexp -- $Horoscope::HoroMatchesRE $HoroWhatWeGot -&gt; Matches Love Friend Career]} {              puthelp "PRIVMSG $chan :[::Horoscope::HoroCleanUp [set AllMatches "\00314$Matches\003: $Love - $Friend - $Career"]]";           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroMatchesRE";           }        };        return 0     }     proc HorosPubProcName {nick uhost hand chan arg} {        if {![channel get $chan Horoscope]} { return 0 };        ::Horoscope::MainHoroProcName $nick $uhost $hand $chan $arg     }     proc EggPvtHorosProcName {nick uhost hand arg} {        ::Horoscope::MainHoroProcName $nick $uhost $hand $nick $arg     }     proc PrintHoro {HoroTarget HoroString} {        lmap HoroLines [splitn $HoroString $Horoscope::HoroCharsInLineLen] { puthelp "PRIVMSG $HoroTarget :[::Horoscope::HoroCleanUp $HoroLines]" }     }     proc HoroCleanUp HoroHTMLs {         regsub -all -- {&lt;i class="icon-star-filled highlight"&gt;&lt;/i&gt;} $HoroHTMLs \00307$Horoscope::UnicodeBlackStar\003 HoroHTMLs         regsub -all -- {&lt;i class="icon-star-filled"&gt;&lt;/i&gt;} $HoroHTMLs \00314$Horoscope::UnicodeWhiteStar\003 HoroHTMLs         #regsub -all -- {(:?&lt;strong&gt;|&lt;/strong&gt;|&lt;b&gt;|&lt;/b&gt;)} $HoroHTMLs \002 HoroHTMLs         regsub -all -- {(:?&lt;h4&gt;|&lt;/h4&gt;)} $HoroHTMLs \002 HoroHTMLs         regsub -all -- {&lt;p&gt;([^\s]*)} $HoroHTMLs \00304\\0\003  HoroHTMLs         regsub -all -- "&lt;.+?&gt;" $HoroHTMLs {} HoroHTMLs         regsub -all -- {\s+} $HoroHTMLs " " HoroHTMLs         return [string trim $HoroHTMLs]      }     proc FetchDisHoros Link4Horo {        try {           set TokenHoro [geturl $Link4Horo -timeout [expr {round(1000 * $Horoscope::TimeOutHoro)}]]        } on error { HoroErrorMsg } {           putcmdlog "[file tail [info script]]: [string map {\n " "} $HoroErrorMsg]"        } finally {           if {[status $TokenHoro] eq "ok" &amp;&amp; [ncode $TokenHoro] == 200} {              set TheHoroData [data $TokenHoro]           } else {              putcmdlog "[file tail [info script]]: [status $TokenHoro] , [code $TokenHoro]" }; cleanup $TokenHoro           if {[info exists TheHoroData] &amp;&amp; [string length $TheHoroData]} {              return [mapEscapes $TheHoroData]           } else {              putcmdlog "[file tail [info script]]: Got no any data from: $Link4Horo"           }        }     }  }</code></pre></div><br><a href="https://ibb.co/gSDCyvM" class="postlink"><img src="https://i.ibb.co/QP6G98F/8-5.png" class="postimage" alt="Image"></a><br><br>And this also works with Tcl8.5:<br><div class="codebox"><p>Code: </p><pre><code> package require http  package require htmlparse  package require tls 1.6.4  setudef flag Horoscope  namespace eval Horoscope {     variable HoroCMD ".horo !horo !horoscope"     variable HoroEggPM 1     variable FludControl 10:3     variable HoroCmdFlags -|-     variable HoroWordsInLineLen 36     variable DailyHoroURL {https://www.horoscope.com/us/horoscopes/general/horoscope-general-daily-today.aspx}     variable HoroStarsRE {star-ratings\"&gt;.+?&lt;/div&gt;(.+?)&lt;/div&gt;}    variable HoroDailyRE {&lt;p&gt;&lt;strong&gt;(.*?)&lt;/p&gt;}     variable HoroMatchesRE {&lt;h3&gt;(.*?)&lt;/h3&gt;.+?love.+?&gt;(.*?)&lt;/p&gt;.+?friend.+?&gt;(.*?)&lt;/p&gt;.+?career.+?&gt;(.*?)&lt;/p&gt;}     variable UnicodeBlackStar \u2605     variable UnicodeWhiteStar \u2606     variable TimeOutHoro 12     variable MoodRatings "\00314Today's Star Ratings - Your general mood\003"     foreach CmdSign [split $HoroCMD { }] {        bind pub $HoroCmdFlags $CmdSign [namespace current]::HorosPubProcName        if {$HoroEggPM &gt;= 1 &amp;&amp; [string length $HoroEggPM]} {           bind msg $HoroCmdFlags $CmdSign [namespace current]::EggPvtHorosProcName        }     };     putlog "[file tail [info script]] Loaded!"     namespace path {::http:: ::htmlparse::}     register https 443 [list tls::socket -ssl2 0 -ssl3 0 -tls1 1]     proc MainHoroProcName {nick uhost hand chan text} {        variable FludControl        set TargetHost [lindex [split $uhost @] 1]        if {![info exists ::HoroFludVar($TargetHost)] &amp;&amp; ![info exists ::HoroFludVar($nick)]} {           array set ::HoroFludVar [list $nick [clock seconds] $TargetHost 1]        } else {           incr ::HoroFludVar($TargetHost)        }        if {([expr {[clock seconds] - $::HoroFludVar($nick)}] &lt; [lindex [split $FludControl :] 0]) &amp;&amp; ($::HoroFludVar($TargetHost) &gt; [lindex [split $FludControl :] 1])} {           putserv "NOTICE $nick :$nick You able to use $::lastbind command [lindex [split $FludControl :] 1] times in [lindex [split $FludControl :] 0] seconds!";           return 0;        }        utimer [lindex [split $FludControl :] 0] [list unset -nocomplain ::HoroFludVar($TargetHost) ::HoroFludVar($nick)]        set HoroRequest [lindex [split [stripcodes abcgru [string tolower $text]]] 0]        array set ListOfHoros [list aries 1 taurus 2 gemini 3 cancer 4 leo 5 virgo 6 libra 7 scorpio 8 sagittarius 9 capricorn 10 aquarius 11 pisces 12]        if {![llength $HoroRequest]} {           putserv "NOTICE $nick :Usage: $::lastbind &lt;Horoscope&gt;";           return 0        } elseif {$HoroRequest ni [array names ListOfHoros]} {           putserv "NOTICE $nick :\"$HoroRequest\" is not valid!";           return        } else {           set HoroWhatWeGot [::Horoscope::FetchDisHoros ${Horoscope::DailyHoroURL}?sign=$ListOfHoros($HoroRequest)]           if {[regexp -- $Horoscope::HoroDailyRE $HoroWhatWeGot -&gt; TodaysHoro]} {              ::Horoscope::PrintHoro $chan [::Horoscope::HoroCleanUp $TodaysHoro]           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroDailyRE";           }           if {[regexp -- $Horoscope::HoroStarsRE $HoroWhatWeGot -&gt; HiLightStars]} {               puthelp "PRIVMSG $chan :$Horoscope::MoodRatings : [::Horoscope::HoroCleanUp $HiLightStars]";           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroStarsRE";           }           if {[regexp -- $Horoscope::HoroMatchesRE $HoroWhatWeGot -&gt; Matches Love Friend Career]} {              puthelp "PRIVMSG $chan :[::Horoscope::HoroCleanUp [set AllMatches "\00314$Matches\003: $Love - $Friend - $Career"]]";           } else {              putcmdlog "[file tail [info script]]: Somethings wrong with $Horoscope::HoroMatchesRE";           }        };        return 0     }     proc HorosPubProcName {nick uhost hand chan arg} {        if {![channel get $chan Horoscope]} { return 0 };        ::Horoscope::MainHoroProcName $nick $uhost $hand $chan $arg     }     proc EggPvtHorosProcName {nick uhost hand arg} {        ::Horoscope::MainHoroProcName $nick $uhost $hand $nick $arg     }     proc PrintHoro {HoroTarget HoroString} {        if {[set HoroLineLen [llength [set HoroLenght [split $HoroString]]]] &gt; $Horoscope::HoroWordsInLineLen} {           for { set i 0 } { $i &lt; $HoroLineLen } { incr i $Horoscope::HoroWordsInLineLen } {              if {$i == 0} {                 puthelp "PRIVMSG $HoroTarget :[join [lrange $HoroLenght $i [expr {$i + ($Horoscope::HoroWordsInLineLen - 1)}]]]"              } {                 puthelp "PRIVMSG $HoroTarget :[join [lrange $HoroLenght $i [expr {$i + ($Horoscope::HoroWordsInLineLen - 1)}]]]"              }           }        }     }     proc HoroCleanUp HoroHTMLs {         regsub -all -- {&lt;i class="icon-star-filled highlight"&gt;&lt;/i&gt;} $HoroHTMLs \00307$Horoscope::UnicodeBlackStar\003 HoroHTMLs         regsub -all -- {&lt;i class="icon-star-filled"&gt;&lt;/i&gt;} $HoroHTMLs \00314$Horoscope::UnicodeWhiteStar\003 HoroHTMLs         #regsub -all -- {(:?&lt;strong&gt;|&lt;/strong&gt;|&lt;b&gt;|&lt;/b&gt;)} $HoroHTMLs \002 HoroHTMLs         regsub -all -- {(:?&lt;h4&gt;|&lt;/h4&gt;)} $HoroHTMLs \002 HoroHTMLs         regsub -all -- {&lt;p&gt;([^\s]*)} $HoroHTMLs \00304\\0\003  HoroHTMLs         regsub -all -- "&lt;.+?&gt;" $HoroHTMLs {} HoroHTMLs         regsub -all -- {\s+} $HoroHTMLs " " HoroHTMLs         return [string trim $HoroHTMLs]      }     proc FetchDisHoros Link4Horo {        if {[catch { set TokenHoro [geturl $Link4Horo -timeout [expr {round(1000 * $Horoscope::TimeOutHoro)}]] } HoroErrorMsg]} {           putcmdlog "[file tail [info script]]: [string map {\n " "} $HoroErrorMsg]"        }        if {[string equal -nocase [status $TokenHoro] ok] &amp;&amp; [ncode $TokenHoro] == 200} {           set TheHoroData [data $TokenHoro]        } else {           putcmdlog "[file tail [info script]]: [status $TokenHoro] , [code $TokenHoro]"        };        cleanup $TokenHoro        if {[info exists TheHoroData] &amp;&amp; [string length $TheHoroData]} {           return [mapEscapes $TheHoroData]        } else {           putcmdlog "[file tail [info script]]: Got no any data from: $Link4Horo"        }     }  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Wed Jul 24, 2019 9:09 am</p><hr />
]]></content>
	</entry>
	</feed>
