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

	<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>2006-06-13T21:58:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2006-06-13T21:58:00-04:00</updated>

		<published>2006-06-13T21:58:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63995#p63995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63995#p63995"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63995#p63995"><![CDATA[
Sounds a lot like one of my coding sessions.. "It works!" - "Crap!"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Tue Jun 13, 2006 9:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T06:15:44-04:00</updated>

		<published>2006-06-13T06:15:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63970#p63970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63970#p63970"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63970#p63970"><![CDATA[
Ok, really need sleep..I broke it =)<br>Will have to hack on it tomorrow..or tonight..or whatever =)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 6:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T05:50:00-04:00</updated>

		<published>2006-06-13T05:50:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63968#p63968</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63968#p63968"/>
		<title type="html"><![CDATA[more pestery stuff]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63968#p63968"><![CDATA[
just noticed this, the "bind each sign" uses "*&lt;char&gt;sign", which was probably on purpose, so the trigger is caught in any sentence, but, it produces an error,  at least with the mods I did. It brings up the msg about "Please choose a valid sign" <br><br>So I changed<div class="codebox"><p>Code: </p><pre><code>bind pubm -|- "*${incith::horoscope::command_char}${sign}" incith::horoscope::public_messageto: bind pub -|- "${incith::horoscope::command_char}${sign}" incith::horoscope::public_message</code></pre></div>*tweak* <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Time to goto sleep before I do any more damage<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 5:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T05:39:54-04:00</updated>

		<published>2006-06-13T05:39:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63967#p63967</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63967#p63967"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63967#p63967"><![CDATA[
oops, my bad, I must be tired too..It didnt work (I mis-tested it... I did .horoscope leo,  the error shows when I do .leo   - the 1st letter gets chopped..) Garf..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 5:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T05:35:42-04:00</updated>

		<published>2006-06-13T05:35:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63966#p63966</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63966#p63966"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63966#p63966"><![CDATA[
<blockquote class="uncited"><div>If you do submit any google changes, they'd have to go to the guy I handed the script over to, madwoota.</div></blockquote>Ahh, didn't know you handed it off. I'll have to grab a more recent version (I have v1.8 in my archive)<blockquote class="uncited"><div>As for horoscope.. <br>The . problem can likely be resolved by changing the regexp to {} instead of ""</div></blockquote>Yep, just tried it, and it worked <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Tnx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 5:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2006-06-13T03:35:13-04:00</updated>

		<published>2006-06-13T03:35:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63957#p63957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63957#p63957"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63957#p63957"><![CDATA[
You're amazing. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"> <br><br>If you do submit any google changes, they'd have to go to the guy I handed the script over to, madwoota.<br><br>As for horoscope.. it is probably due for an update, but weather was a priority.<br><br>I'll definitely refer back to this thread for a future horoscope release.  The . problem can likely be resolved by changing the regexp to {} instead of "", but it is late, and sometimes I think I know Tcl better than I really do (which isn't that well).  To be honest, I never use horoscope.. perhaps I'll wait until my luck feels a bit better. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Tue Jun 13, 2006 3:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T01:59:43-04:00</updated>

		<published>2006-06-13T01:59:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63954#p63954</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63954#p63954"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63954#p63954"><![CDATA[
Hmm, now that I looked at my changes again, I just noticed a bit I can condense:<br><div class="codebox"><p>Code: </p><pre><code>                proc send_output {input where} {                      set validsign 0                      foreach sign [split $incith::horoscope::valid_signs " "] {                                if {$input == $sign} {                                        set validsign 1                                }                        }                        if {($validsign == 0) || ($input == "")} {                                puthelp "PRIVMSG $where :Please choose a valid sign: etc etc"                                return                        } else {                              foreach line [incith::horoscope::parse_output [horoscope $input]] {                                        puthelp "PRIVMSG $where :$line"                              }                         }                 }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 1:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-13T01:27:43-04:00</updated>

		<published>2006-06-13T01:27:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63952#p63952</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63952#p63952"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63952#p63952"><![CDATA[
No problem Incith. I actually have your google script in my work dir, haven't had a chance to put it into the bot yet, but it's in my pile of todo stuff <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I'm sure once I do start using it, I'll be pestering you with bugreports and suggestions too, like I do with everyone else <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>I'm also using your horoscope script and did some minor tweaks to my local copy, didn't think they were significant enough to post about.  The most significant change I made was to use:<div class="codebox"><p>Code: </p><pre><code>catch {set http [::http::geturl "${query}daily${input}.html" -timeout [expr 1000 * 15]]} error[..snip..]catch {set http [::http::geturl "${query}dailychinese${input}.html" -timeout [expr 1000 * 15]]} error[..snip..]     if {[string match -nocase "*couldn't open socket*" $error]} {            return "Error: couldn't connect..Try again later"      }if { [::http::status $http] == "timeout" } {[..snip..] </code></pre></div>I added the catch and return error msg cos my isp's dns sucks and I've hit 'host unreachable' quite a few times in scripts.<br><br>Also had to change:<div class="codebox"><p>Code: </p><pre><code>       regsub -- "^${incith::horoscope::command_char}" $input "" inputto:        regsub -- ^\\. $input "" input</code></pre></div>because I use the . char as a cmd char, and the regsub was thinking that the . was an atom so it was chopping off the 1st letter of the sign name when using .horoscope leo, for example.<br><br>Also changed this a bit to give more verbose help:<div class="codebox"><p>Code: </p><pre><code>Original:   namespace eval horoscope {     # SEND_OUTPUT     # no point having two copies of this in public/private_message{}     #     proc send_output {input where} {       foreach line [incith::horoscope::parse_output [horoscope $input]] {         putquick "PRIVMSG $where :$line"       }     }---My change:namespace eval horoscope { # SEND_OUTPUT # no point having two copies of this in public/private_message{}   proc send_output {input where} {      if {$input == ""} {         puthelp "PRIVMSG $where :Please choose a sign: capricorn aquarius pisces aries taurus gemini cancer leo virgo libra scorpio sagittarius rat ox tiger rabbit dragon snake horse goat monkey rooster dog pig"         return      }      set validsign 0       foreach sign [split $incith::horoscope::valid_signs " "] {            if {$input == $sign} {                  set validsign 1            }       }       if {$validsign == 0} {              puthelp "PRIVMSG $where :Please choose a sign: capricorn aquarius pisces aries taurus gemini cancer leo virgo libra scorpio sagittarius rat ox tiger rabbit dragon snake horse goat monkey rooster dog pig"             return       } else {               foreach line [incith::horoscope::parse_output [horoscope $input]] {                     puthelp "PRIVMSG $where :$line"                }         }  }</code></pre></div>And now I've totally mucked up this topic thread &lt;g&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jun 13, 2006 1:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2006-06-12T16:30:33-04:00</updated>

		<published>2006-06-12T16:30:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63939#p63939</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63939#p63939"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63939#p63939"><![CDATA[
I'm not sure how this post will be taken, but by all means I am not trying to prevent people from using your script.<br><br>I just thought I would point out, incith:google script, and Google itself, does conversions for just about anything.  I can even calculate download times with something like 5 MB / 50 KB/s = (5 MB) / (50 (KB / s)) = 102.4 seconds, or you can do 5 MB / 50 KB/s in minutes, and your result would be in minutes.<br><br>Perhaps this post is more directed at those that may already use :google script. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Good job though, a local conversions script will always be faster than one doing net lookups.<br><br>Again, sorry if I've intruded this thread, I'm not looking for props on my scripts or anything. <em class="text-italics">*paranoid*</em> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jun 12, 2006 4:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-10T14:58:29-04:00</updated>

		<published>2006-06-10T14:58:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63882#p63882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63882#p63882"/>
		<title type="html"><![CDATA[v205b]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63882#p63882"><![CDATA[
Some minor updates to the convert script. v205b.  Same url as above.<br>21/5/06 - Added inch/centimeter conversion..<br>27/5/06 - A better string2list was posted in egghelp.org and is now incorporated here.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sat Jun 10, 2006 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-04-27T19:45:45-04:00</updated>

		<published>2006-04-27T19:45:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62431#p62431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62431#p62431"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62431#p62431"><![CDATA[
Neat. Thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Apr 27, 2006 7:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-04-26T18:13:30-04:00</updated>

		<published>2006-04-26T18:13:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62391#p62391</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62391#p62391"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62391#p62391"><![CDATA[
Read last post <a href="http://forum.egghelp.org/viewtopic.php?t=9559&amp;start=40" class="postlink">here</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Apr 26, 2006 6:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-04-26T17:28:25-04:00</updated>

		<published>2006-04-26T17:28:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62389#p62389</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62389#p62389"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62389#p62389"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>'1 +         1'</code></pre></div></div></blockquote>I don't see that as a problem, it just makes the script return an error msg.<br><blockquote class="uncited"><div>you might want to take a look at my FAQ post about splitting</div></blockquote>It does use split on the user input.<br><br>I made one small update to the script as well, to use [split] on the calc $reply, so that replies are properly formated (otherwise it drops chars when [join $rep] is sent to the user.)<br><br>Found a few typos too, fixed <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Apr 26, 2006 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-04-26T05:17:32-04:00</updated>

		<published>2006-04-26T05:17:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62361#p62361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62361#p62361"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62361#p62361"><![CDATA[
<blockquote class="uncited"><div>You mean like '1 + 1'  ?     Not sure I follow your meaning.</div></blockquote><div class="codebox"><p>Code: </p><pre><code>'1 +         1'</code></pre></div>you might want to take a look at my FAQ post about splitting<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Apr 26, 2006 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-04-26T05:03:06-04:00</updated>

		<published>2006-04-26T05:03:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62359#p62359</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62359#p62359"/>
		<title type="html"><![CDATA[new version of convert.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62359#p62359"><![CDATA[
my calc bind looks like that and I am pretty confident about the safety:<br><div class="codebox"><p>Code: </p><pre><code>...set text [string map {[ ( ] ) $ " dollar "} $text]...catch {set ergebnis [expr $text]} fehler...</code></pre></div>At least I failed with all my imaginations to force a second substitition.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Apr 26, 2006 5:03 am</p><hr />
]]></content>
	</entry>
	</feed>
