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

	<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>2003-08-26T08:50:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-26T08:50:09-04:00</updated>

		<published>2003-08-26T08:50:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25691#p25691</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25691#p25691"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25691#p25691"><![CDATA[
*snicker*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Tue Aug 26, 2003 8:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-08-26T03:43:01-04:00</updated>

		<published>2003-08-26T03:43:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25682#p25682</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25682#p25682"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25682#p25682"><![CDATA[
ah, thats how strikelight &amp; user boost their user level....3 topics with dialogs <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=1433">GodOfSuicide</a> — Tue Aug 26, 2003 3:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-25T20:15:14-04:00</updated>

		<published>2003-08-25T20:15:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25669#p25669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25669#p25669"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25669#p25669"><![CDATA[
<blockquote class="uncited"><div>I see what you are saying now..What you should have said is "inc'ing global variable names that are the same as variable names included in the proc itself"  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> </div></blockquote>I'm sorry about that... English is not my native language and I'm tired :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Aug 25, 2003 8:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-25T20:11:25-04:00</updated>

		<published>2003-08-25T20:11:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25668#p25668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25668#p25668"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25668#p25668"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>There is no way it could screw up, as "var" is the local variable, $var (ie. The CONTENTS of var) is the global.</div></blockquote>Good luck trying to 'inc' any of these using your proc: switch, var, value, garbage, type and ttime.</div></blockquote>I see what you are saying now..What you should have said is "inc'ing global variable names that are the same as variable names included in the proc itself"  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><div class="codebox"><p>Code: </p><pre><code>proc safeunset {__var} {   global $__var   catch {unset $__var} } proc inc {__switch __var __value} {   global $__var  if {![info exists $__var]} { set $__var $__value  }  regexp -- {-(s|m)(.*)} $__switch __garbage __type __ttime   switch $__type -- {     "s" { utimer $__ttime [list safeunset $__var] }     "m" { timer $__ttime [list safeunset $__var] }   } } </code></pre></div>It is highly doubtful that the user will be using variables with those names now, while still maintaining compatibility.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon Aug 25, 2003 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-25T19:57:50-04:00</updated>

		<published>2003-08-25T19:57:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25665#p25665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25665#p25665"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25665#p25665"><![CDATA[
<blockquote class="uncited"><div>There is no way it could screw up, as "var" is the local variable, $var (ie. The CONTENTS of var) is the global.</div></blockquote>Good luck trying to 'inc' any of these using your proc: switch, var, value, garbage, type and ttime.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Aug 25, 2003 7:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-25T19:41:12-04:00</updated>

		<published>2003-08-25T19:41:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25662#p25662</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25662#p25662"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25662#p25662"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>From the description he gave, global is what he would want for the proc</div></blockquote>Yes...but your code would screw up if he was trying to manipulate a global variable by the same name used inside your proc (several to chose from)<br></div></blockquote>There is no way it could screw up, as "var" is the local variable, $var (ie. The CONTENTS of var) is the global.<br><br><blockquote class="uncited"><div>Upvar can be used to import global variables too you know...<div class="codebox"><p>Code: </p><pre><code>upvar #0 var blah</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>upvar &lt;any valid level&gt; ::var blah</code></pre></div></div></blockquote>Yes I am aware of this, but it is not completely compatible across the entire (older) eggdrop/tcl line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon Aug 25, 2003 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-25T19:39:37-04:00</updated>

		<published>2003-08-25T19:39:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25661#p25661</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25661#p25661"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25661#p25661"><![CDATA[
<blockquote class="uncited"><div>From the description he gave, global is what he would want for the proc</div></blockquote>Yes...but your code would screw up if he was trying to manipulate a global variable by the same name used inside your proc (several to chose from)<br><br>Upvar can be used to import global variables too you know...<div class="codebox"><p>Code: </p><pre><code>upvar #0 var blah</code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>upvar &lt;any valid level&gt; ::var blah</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Aug 25, 2003 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-25T19:33:45-04:00</updated>

		<published>2003-08-25T19:33:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25657#p25657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25657#p25657"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25657#p25657"><![CDATA[
<blockquote class="uncited"><div>Btw: if you're gonna use that inc proc strikelight gave you you better make sure you never use a variable name used in the proc. (or change that 'global' line to use 'upvar' instead) And don't inc a var again before the previous timer ends or you'll have timer errors all over (trying to unset a non existant var)</div></blockquote>From the description he gave, global is what he would want for the proc (as it is a global variable he is setting from my understanding).<br>As for the timers ending, and successive inc's generating errors (I don't know what happens in the mIRC command, again just goin by description...), to avoid that simply make it as such:<br><div class="codebox"><p>Code: </p><pre><code>proc safeunset {var} {  global $var  catch {unset $var}}proc inc {switch var value} {   global $var   if {![info exists $var]} { set $var $value }   regexp -- {-(s|m)(.*)} $switch garbage type ttime   switch $type -- {     "s" { utimer $ttime [list safeunset $var] }     "m" { timer $ttime [list safeunset $var] }   } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon Aug 25, 2003 7:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-25T19:21:32-04:00</updated>

		<published>2003-08-25T19:21:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25656#p25656</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25656#p25656"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25656#p25656"><![CDATA[
<blockquote class="uncited"><div>I will hire someone to write a module with new commands.</div></blockquote>I don't think a module is needed. How about adding a couple of procs/aliases to alltools or some other tcl that comes with eggdrop?<br><blockquote class="uncited"><div>inc, remove (-nocase string,substring), and whatever else i find annoying.</div></blockquote>What did you mean by that?<br><br>What commands do you miss except from 'inc'? You could make a mIRC namespace with all the commands you miss the most and suggest it for inclusion in the next eggdrop release <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Btw: if you're gonna use that inc proc strikelight gave you you better make sure you never use a variable name used in the proc. (or change that 'global' line to use 'upvar' instead) And don't inc a var again before the previous timer ends or you'll have timer errors all over (trying to unset a non existant var)<br><br><br>Tiny rant about bloated languages like mIRC script:<br><br>Having several commands that do the same thing serves no purpose but bloating the language. And having several commands that do several of the same things just seems insane to me (eg: set, inc &amp; dec in mIRC).<br>In order to be able to read a script written by someone else you'll have to learn many more commands, but the language doesn't benefit from it in any way. Each command become more bloated and slowed down because there's more options to be checked for and as a "bonus" you get people asking how to decrease a variable in Tcl, because there's no "decr" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>I could go on about this for a while, but I'll stop and go to bed <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=2878">user</a> — Mon Aug 25, 2003 7:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-08-25T18:58:47-04:00</updated>

		<published>2003-08-25T18:58:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25652#p25652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25652#p25652"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25652#p25652"><![CDATA[
if you want mirc scripting than stick to it<br>if you want TCL scripting than stick to it<br><br>the more stuff like this is added to eggdrops (modular) the more we go away from real TCL. Then slenox would have to to open a "mIRC4eggie Forum", get himself a windows server and host some tiny little mirc / angel / whatever.<br><br>Pure TCL would be too hard for the most features, sure, but we dont need to bring in more than the nescessary stuff.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Mon Aug 25, 2003 6:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-25T16:52:11-04:00</updated>

		<published>2003-08-25T16:52:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25648#p25648</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25648#p25648"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25648#p25648"><![CDATA[
Thank you strikelight, you are a scholar and a gentleman.<br><br>But i wanted these new commands for everyone, most new<br>scripters to eggdrop have no formal training (like me)<br>and the manuals at tcl are brief with their description<br>and no examples most of the time.<br><br>Scripting for eggdrop is about bots, files, channels, nicks, and text.<br>TCL was made to control machines, scripting for machines<br>is about position, time, speed, and cycles.<br><br>The bottom line is this:<br>I love eggdrop and our good friends at eggdrop continue to <br>advance the program, I take my hat off to you guys.<br>I want the tcl languge(for eggdrop) to advance too.<br><br>I will hire someone to write a module with new commands.<br><br>inc, remove (-nocase string,substring), and whatever else i find annoying.<br><br>Thanks for all the help i have recieved at this forum.<br>Without this forum i would know nothing. <br>As it is, I still know very little about tcl for eggdrop, but i am learning.<br><br>Thanks again for all the help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Mon Aug 25, 2003 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-24T23:34:07-04:00</updated>

		<published>2003-08-24T23:34:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25614#p25614</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25614#p25614"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25614#p25614"><![CDATA[
<blockquote class="uncited"><div>something like this:<br><br>inc -s30 color blue<br><br>It would "set" the var "color" as "blue", (if one does not exists)<br>other wise it would set the exisiting var to last 30 seconds, then 30 seconds later, unset itself.<br>It would replace 3 lines of script and 3 commands.<br><br>"s" switch to call seconds<br>"m" swtich to call minutes<br><br>all this:<br><br>set var<br>increase var<br>timer unset var<br>unset var<br><br>gets to be boring<br><br>tcl for eggdrop needs to move forward.<br>5 or 6 new commands added into a <br>tools module would be nice     <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"></div></blockquote>From what I gather from your description...<br><div class="codebox"><p>Code: </p><pre><code>proc inc {switch var value} {  global $var  if {![info exists $var]} { set $var $value }  regexp -- {-(s|m)(.*)} $switch garbage type ttime  switch $type -- {    "s" { utimer $ttime [list unset $var] }    "m" { timer $ttime [list unset $var] }  }}</code></pre></div>There.. TCL has been expanded for you now... Now you can include that code and use 'inc -s20 color blue' as many times as you'd like...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Aug 24, 2003 11:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-24T21:09:24-04:00</updated>

		<published>2003-08-24T21:09:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25611#p25611</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25611#p25611"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25611#p25611"><![CDATA[
tcl was not written for IRC, therefore it needs to be adapted.<br>tcl has no commands directly related to IRC, <br>only the modules that have been made by our friends at eggdrop.<br>Why go threw 3-4 commands that were not made for IRC,<br>when 1 new command can do it?<br><br>I have seen your posts user, it is very apparent that<br>you are a true master at scripting in tcl, <br>you have a vast wealth of scripting skills.<br><br>But the rest of us are struggling with commands<br>that were never intended to govern chatrooms.<br><br>5 or 6 new commands could help many, in the present and <br>future, to focus on new scripts instead of dealing with commands<br>that where never intended for IRC bots.<br><br>You may be a better scripter at mIRC than I. <br>If so, then you know that there are commands that<br>handle vars, timed vars, bans, and strings with ease.<br>What is wrong with eggdrop adding new commands to handle<br>the basic needs of scripters?<br><br>There is usually a better way to do something,<br>computer languages usually grow or are left behind.<br><br>There will come a day when even C is will be a second<br>choice to a more advanced language.<br><br>What is wrong with a new tools module for eggdrop?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Sun Aug 24, 2003 9:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-08-24T13:13:32-04:00</updated>

		<published>2003-08-24T13:13:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25589#p25589</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25589#p25589"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25589#p25589"><![CDATA[
<blockquote class="uncited"><div>inc -s30 color blue</div></blockquote>Unlearn the mIRC way of thinking. I'm sure what you want can be done in several other ways without this stupid "feature". Or you could make a small proc that makes a timed variable just like that if you refuse to unlearn <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=2878">user</a> — Sun Aug 24, 2003 1:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-24T11:35:19-04:00</updated>

		<published>2003-08-24T11:35:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25583#p25583</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25583#p25583"/>
		<title type="html"><![CDATA[Timed Vars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25583#p25583"><![CDATA[
something like this:<br><br>inc -s30 color blue<br><br>It would "set" the var "color" as "blue", (if one does not exists)<br>other wise it would set the exisiting var to last 30 seconds, then 30 seconds later, unset itself.<br>It would replace 3 lines of script and 3 commands.<br><br>"s" switch to call seconds<br>"m" swtich to call minutes<br><br>all this:<br><br>set var<br>increase var<br>timer unset var<br>unset var<br><br>gets to be boring<br><br>tcl for eggdrop needs to move forward.<br>5 or 6 new commands added into a <br>tools module would be nice     <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Sun Aug 24, 2003 11:35 am</p><hr />
]]></content>
	</entry>
	</feed>
