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

	<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>2002-03-05T16:11:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-05T16:11:00-04:00</updated>

		<published>2002-03-05T16:11:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5086#p5086</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5086#p5086"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5086#p5086"><![CDATA[
Thank you very much! this is exactly what I am looking for.<br>Now after 2 server crashes in 12 hours, perhaps I can get back to the script.<br><br>Again. Thank you!!!<br><br>Otterboyy<p>Statistics: Posted by Guest — Tue Mar 05, 2002 4:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-03-05T07:18:00-04:00</updated>

		<published>2002-03-05T07:18:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5064#p5064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5064#p5064"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5064#p5064"><![CDATA[
Calling your own procedure is exactly like calling any of tcl's builtin ones (puts, open, close, etc). Check out <a href="http://dev.scriptics.com" class="postlink">http://dev.scriptics.com</a> for detailed help with tcl syntax.<br><div class="codebox"><p>Code: </p><pre><code>proc firstproc {text} {  if {[string match $text "*sheep*"] == 1} {    secondproc "Sheep" $text  } elseif {[string match $text "*goat*"] == 1} {    secondproc "Goats" $text  } else {    putlog "off-topic discussion detected!"  }}proc secondproc {title line} {  # open file for appending  set fp [open /home/apache/www/animals.html a+]  puts $fp "&lt;b&gt;$title&lt;/b&gt;: $line&lt;br&gt;"  close $fp}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Mar 05, 2002 7:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-04T19:24:00-04:00</updated>

		<published>2002-03-04T19:24:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5050#p5050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5050#p5050"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5050#p5050"><![CDATA[
nop<br><br>use something like this:<br><br>proc proc1 { arg } {<br>  set var [proc2]<br>}<br><br>proc proc2 { arg } {<br>  return 1<br>}<br><br>$var in proc1 will get the value 1, proc2 returns 1 to $var<br>or just type this in a proc:<br>proc2<br><br>and proc2 will be runned<p>Statistics: Posted by Guest — Mon Mar 04, 2002 7:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-04T18:51:00-04:00</updated>

		<published>2002-03-04T18:51:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5048#p5048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5048#p5048"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5048#p5048"><![CDATA[
So I can do something like<br><br>Proc name {args} {<br>          if {condition} {<br>             do this<br>             } else {<br>             do this<br>             call proc {args}<br>                    }<br>}<br><br>The "call proc {args}" was made up by me. Not sure if thats the format or not.<br>Could you, or someone provide a sample?<br>To be clear, I would like to pass the argument $args to the second proc for processing further.<br><br>Thanks again!<br><br>Otterboy<p>Statistics: Posted by Guest — Mon Mar 04, 2002 6:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-04T18:47:00-04:00</updated>

		<published>2002-03-04T18:47:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5047#p5047</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5047#p5047"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5047#p5047"><![CDATA[
yes u can <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>greejtz, Zygo.<p>Statistics: Posted by Guest — Mon Mar 04, 2002 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-04T18:32:00-04:00</updated>

		<published>2002-03-04T18:32:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5046#p5046</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5046#p5046"/>
		<title type="html"><![CDATA[Procedure in a procedure?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5046#p5046"><![CDATA[
After several months delay, I find myself up against a wall and having to learn IRCD's, Eggbot in general and TCL so I can have custom actions done for a company I work for.<br><br>With all that, I have gotten to the point of writing my first TCL for Egg and it works well. Now I want to add on to the tcl I have now.<br>It consists of one bind (!URG) and a procedure to process that bind and do something with the text (send PRVMSG to all in channel). Simple, yet effective for what I need.  Now what I want to do is to take the text of that message and write it out to a file, formated in HTML.<br>I feel I can do that, but in the interests of being modular, I would like to write it in another tcl file or procedure and call it from the urgmsg proc I created.<br>So to sum it up.   When the urgmsg proc is fired by the bind !URG, I want to take the text that follows !URG and write it to a file in HTML format. <br>So can I create this 2nd proc and call it from with in the first?<br><br>Thanks in advance!<br><br>Otterboyy<p>Statistics: Posted by Guest — Mon Mar 04, 2002 6:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
