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

	<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>2009-02-09T14:26:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Miku]]></name></author>
		<updated>2009-02-09T14:26:33-04:00</updated>

		<published>2009-02-09T14:26:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87309#p87309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87309#p87309"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87309#p87309"><![CDATA[
Thanks that worked like a charm. I was reading a tutorial about how to filter special characters but it was rather confusing and had the "\" in series of 3 and 5. <br><br>Anywho thanks again, script works great now <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=10482">Miku</a> — Mon Feb 09, 2009 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-02-08T16:09:12-04:00</updated>

		<published>2009-02-08T16:09:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87297#p87297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87297#p87297"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87297#p87297"><![CDATA[
Tcl will attempt to interpret and substitute anything enclosed in square brackets as a command and its arguments (if it has any), so your script is choking on [Hatsuyuki] since no such command exists.<br><br>Simply escape the characters with special Tcl meaning in order for them to be accepted as their normal literal selves.<br><div class="codebox"><p>Code: </p><pre><code>"\002(MKV)\002 - \002(\002/msg \[Hatsuyuki\]Maka xdcc send #9\002)\002"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sun Feb 08, 2009 4:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Miku]]></name></author>
		<updated>2009-02-08T13:06:03-04:00</updated>

		<published>2009-02-08T13:06:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87293#p87293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87293#p87293"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87293#p87293"><![CDATA[
Okay, I feel retarded now. Turns out that my initial script, as well as all of yours, would have worked except I have a special character in my message which chokes it. Now I just have to figure out a way around this and it'll be good to go.<br><br>The line reads:<div class="codebox"><p>Code: </p><pre><code>"\002(MKV)\002 - \002(\002/msg [Hatsuyuki]Maka xdcc send #9\002)\002"</code></pre></div>in case any of you know an easy fix. It hangs up on the [Hatsuyuki] part.<br><br>Thanks for all your help so far.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10482">Miku</a> — Sun Feb 08, 2009 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-02-08T12:05:05-04:00</updated>

		<published>2009-02-08T12:05:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87291#p87291</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87291#p87291"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87291#p87291"><![CDATA[
<blockquote class="uncited"><div>Something like this often works:<div class="codebox"><p>Code: </p><pre><code>set mynotcs {Message 1Message 2Message 3Message 4}</code></pre></div></div></blockquote><div class="codebox"><p>Code: </p><pre><code>set mynotcs {"Message 1""Message 2""Message 3""Message 4"}</code></pre></div>You might need to build your tcl-list using double quotes to keep those spaces within each line from breaking things.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Feb 08, 2009 12:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-02-08T16:12:23-04:00</updated>

		<published>2009-02-08T11:44:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87290#p87290</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87290#p87290"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87290#p87290"><![CDATA[
You do seem to have a statement that, once called,  would continue to attempt to call itself recursively :-<br><div class="codebox"><p>Code: </p><pre><code>proc putnot {nick msg} { putnot "NOTICE $nick :$msg" }</code></pre></div>You are fortunate it failed, probably because the first time it called itself (the second time it executes overall, coincidentally) it does so with one argument but the proc needs two. Therefore it would not send to the IRCD ad nauseum. Lucky you.<br><br>If you particularly wanted the code in the format you pasted, then try the following :-<br><div class="codebox"><p>Code: </p><pre><code>bind PUB - !notice pNoticeproc pNotice {nick uhost hand chan rest} {     if {[string length [string trim $rest]] == 0} {        pOutput $nick "Message 1"         pOutput $nick "Message 2"         pOutput $nick "Message 3"         pOutput $nick "Message 4"         pOutput $nick "Message 5"    }    return 0} proc pOutput {nick msg} {putserv "NOTICE $nick :$msg"}</code></pre></div>I favour the style of the previous poster. A list of responses set as a variable outside the bind proc gives greater flexibility, in case you wish to publish the script and allow users to configure their own messages.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sun Feb 08, 2009 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-02-08T11:00:41-04:00</updated>

		<published>2009-02-08T11:00:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87287#p87287</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87287#p87287"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87287#p87287"><![CDATA[
Something like this often works:<div class="codebox"><p>Code: </p><pre><code>set mynotcs {Message 1Message 2Message 3Message 4}proc mynotc {nick host handle channel text} { global mynotcs  set dest [lindex [split $text] 0]  foreach notc $mynotcs {   puthelp "NOTICE $dest :$notc"  }   return}bind pub -|- !notc mynotc</code></pre></div> The important things to be aware of are the <strong class="text-strong">global mynotcs</strong> which gives us the messages we set in <em class="text-italics">set mynotcs</em>. And as we use a <span style="text-decoration:underline">foreach</span> loop, we are able to use all the notc's one at a time using <strong class="text-strong">$notc</strong><br><br>I dont know if that will work, but i hope it at least made sense. <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=8130">TCL_no_TK</a> — Sun Feb 08, 2009 11:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Miku]]></name></author>
		<updated>2009-02-08T12:20:55-04:00</updated>

		<published>2009-02-08T09:54:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87286#p87286</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87286#p87286"/>
		<title type="html"><![CDATA[Multiple Notices]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87286#p87286"><![CDATA[
Hello, I am trying to send a user multiple notices when they say a specific trigger, but each time it stops after only 2. <br><br>My code looks like this:<br><div class="codebox"><p>Code: </p><pre><code>proc putnot {nick msg} { putserv "NOTICE $nick :$msg" }proc pub_!trigger {nick uhost hand chan rest} {  global botnick  set cmd [string tolower [lindex $rest 0]]   if {$cmd == ""} {    putnot $nick "Message 1"    putnot $nick "Message 2"    putnot $nick "Message 3"    putnot $nick "Message 4"    putnot $nick "Message 5" ;return 0} }bind pub - !trigger pub_!trigger</code></pre></div>Any help is appreciated. Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10482">Miku</a> — Sun Feb 08, 2009 9:54 am</p><hr />
]]></content>
	</entry>
	</feed>
