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

	<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>2007-06-27T18:03:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ipone]]></name></author>
		<updated>2007-06-27T18:02:45-04:00</updated>

		<published>2007-06-27T18:02:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73947#p73947</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73947#p73947"/>
		<title type="html"><![CDATA[A trigger notice script (newb need some help)[SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73947#p73947"><![CDATA[
ooh sweet. thanks. now i know little more about tcl-scripting. this forum is going to be verry usefull <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7525">ipone</a> — Wed Jun 27, 2007 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-06-27T10:42:08-04:00</updated>

		<published>2007-06-27T10:42:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73928#p73928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73928#p73928"/>
		<title type="html"><![CDATA[A trigger notice script (newb need some help)[SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73928#p73928"><![CDATA[
the reason it does not work is that the firstchannel and channelmsg variables are set outside the proc, meaning they are in global space. The firstchannel and channelmsg variables are within the proc, which is not in global space. You need to import the firstchannel and channelmsg variables from global space into the proc. For this you use:<br><div class="codebox"><p>Code: </p><pre><code>global firstchannel channelmsg</code></pre></div>This will import the global space variables firstchannel and channelmsg into proc space variables firstchannel and channelmsg.<br><br>For the if statement, it would be better to use a string equal -nocase, otherwise if the channels dont match case, it wont continue.<br><div class="codebox"><p>Code: </p><pre><code>if {[string equal -nocase $channel $firstchannel]} {</code></pre></div>You also need another " if your putquick statement at the end.<br><br><br><div class="codebox"><p>Code: </p><pre><code>putquick "notice $nickname :$channelmsg"</code></pre></div>The return 0 is not needed.<br><br>So the end code should look like:<br><div class="codebox"><p>Code: </p><pre><code>set trigger "!help"set firstchannel "#test"set channelmsg "need some help?"bind pub - $trigger trigger1proc trigger1 {nickname hostname handle channel text} {  global firstchannel channelmsg  if {[string equal -nocase $channel $firstchannel]} {    putquick "notice $nickname :$channelmsg"  }}</code></pre></div>Hope this helps <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=6300">r0t3n</a> — Wed Jun 27, 2007 10:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ipone]]></name></author>
		<updated>2007-06-27T18:03:00-04:00</updated>

		<published>2007-06-27T03:27:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73923#p73923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73923#p73923"/>
		<title type="html"><![CDATA[A trigger notice script (newb need some help)[SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73923#p73923"><![CDATA[
Hey im a total newb when it comes to tcl scripting for eggdrops.<br><br>I was trying to make a simpel trigger script for multiple channels<br><br>i know its already have been done and i can download it and add it to the bot.<br>but i figerd that if i want to learn tcl i need to do i myself.<br><div class="codebox"><p>Code: </p><pre><code>set trigger "!help"set firstchannel "#test"set channelmsg "need some help?"bind pub - $trigger trigger1proc trigger1 {nickname hostname handle channel text} {  if {$channel == $firstchannel} {    putquick "notice $nickname :$channelmsg    } return 0}</code></pre></div>ive would be verry happy if someone can help me with this. not just say how the code must be, also maybe try to explain why and so on.<br><br>btw. sry for bad english<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7525">ipone</a> — Wed Jun 27, 2007 3:27 am</p><hr />
]]></content>
	</entry>
	</feed>
