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

	<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>2004-03-27T14:30:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Xpert]]></name></author>
		<updated>2004-03-27T14:30:16-04:00</updated>

		<published>2004-03-27T14:30:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34997#p34997</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34997#p34997"/>
		<title type="html"><![CDATA[Script for changing the topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34997#p34997"><![CDATA[
Use in the first line in your proc:<div class="codebox"><p>Code: </p><pre><code>global &lt;variables&gt;</code></pre></div>Example:<div class="codebox"><p>Code: </p><pre><code>global avail wartype</code></pre></div><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=4667">Xpert</a> — Sat Mar 27, 2004 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Real]]></name></author>
		<updated>2004-03-27T12:57:00-04:00</updated>

		<published>2004-03-27T12:57:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34992#p34992</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34992#p34992"/>
		<title type="html"><![CDATA[Script for changing the topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34992#p34992"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc pub_avail {nick host hand chan text} {   global avail   set myname "[lindex $text 1]"   if {($myname != "") &amp;&amp; ([string match -nocase "#666.to" "$chan"])} {     if {$avail == ""} {       set avail "$myname"       } else {       append avail " $myname"     }    putserv "TOPIC #666.to :$wartype $avail"  } }</code></pre></div>So this is slightly adjusted from yours. <br><br>I have a question though <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> There's the $wartype variable, but this variable has to be set with another proc, but I think if you use "set $wartype xxx" the variable will only work for 1 proc. I'm I right? <br><br>So I want the variables to remain the entire time. Is this possible?<br><br>Sorry if I haven't explained well enough <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=4669">Real</a> — Sat Mar 27, 2004 12:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Xpert]]></name></author>
		<updated>2004-03-27T08:00:24-04:00</updated>

		<published>2004-03-27T08:00:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34981#p34981</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34981#p34981"/>
		<title type="html"><![CDATA[Script for changing the topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34981#p34981"><![CDATA[
Ok, try this code:<div class="codebox"><p>Code: </p><pre><code>bind pub - !avail pub:availproc pub:avail {nick host hand chan text} {  global avail  set myname "[lindex $text 1]"  if {($myname != "") &amp;&amp; ([string match -nocase "#666.to" "$chan"])} {    if {$avail == ""} {      set avail "$myname"      } else {      append avail " $myname"    }  }}</code></pre></div>Hope it helps <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=4667">Xpert</a> — Sat Mar 27, 2004 8:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Real]]></name></author>
		<updated>2004-03-27T06:38:28-04:00</updated>

		<published>2004-03-27T06:38:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34976#p34976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34976#p34976"/>
		<title type="html"><![CDATA[Script for changing the topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34976#p34976"><![CDATA[
Hi, I need some help scripting a TCL script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>It's purpose is for a private clan channel, where line-ups for wars can be made.<br>If anyone uses <div class="codebox"><p>Code: </p><pre><code>!avail myname</code></pre></div>, it has to add myname to the topic.<br><br>In irc this is:<div class="codebox"><p>Code: </p><pre><code>on 1:TEXT:!avail *:#666.to:{//set %avail %avail $2 }</code></pre></div>So this command writes the names which are already in %avail in %avail again + the new nick (the $2)<br>How is this done in TCL? I'm having some problems with variables in TCL, so can you help me out here?<br><br>Now the editing of the topic. There are a lot of variables which have to be written to the topic every time you change a little thing.<div class="codebox"><p>Code: </p><pre><code>/availtopic { //Topic #channel %wartype vs %wenemy ][ Date: %wdate Time: %wtime ][ Avail: %avail ]</code></pre></div>The variables are changed with !wartype, !wtime commands, but if I know how !avail works, I can make those myself too ofcourse <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The main problem is that I can't handle variables.<br><br>I think this is all for now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Big thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4669">Real</a> — Sat Mar 27, 2004 6:38 am</p><hr />
]]></content>
	</entry>
	</feed>
