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

	<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-05-01T18:02:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-05-01T18:02:45-04:00</updated>

		<published>2003-05-01T18:02:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19708#p19708</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19708#p19708"/>
		<title type="html"><![CDATA[need help with my tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19708#p19708"><![CDATA[
Please re-read your logic.<br><div class="codebox"><p>Code: </p><pre><code>proc pub_slap { nick uhost hand dest chan keyword text } { global botnick global slapreply if {[string index $dest 0] != "#"} { return 0 } if {[lindex $text 1] == "slaps"} { if {[lindex $text 1] == $botnick} { putserv "PRIVMSG $chan :[lindex $slapreply [rand [llength $slapreply]]]" } } }</code></pre></div>The above requores that the 2nd word be slaps, and that your botnick be slaps.<br><br>My guess is you want the index to be 0 for the slaps match.<br><br>Aditionaly, you are using list commands (lindex) on a string ($text). You need to convert the string into a list first using [split]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu May 01, 2003 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-05-01T15:11:38-04:00</updated>

		<published>2003-05-01T15:11:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19702#p19702</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19702#p19702"/>
		<title type="html"><![CDATA[need help with my tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19702#p19702"><![CDATA[
doesnt work still <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by Guest — Thu May 01, 2003 3:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-05-01T13:52:51-04:00</updated>

		<published>2003-05-01T13:52:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19701#p19701</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19701#p19701"/>
		<title type="html"><![CDATA[need help with my tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19701#p19701"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc pub_slap { nick uhost hand dest chan keyword text } { </code></pre></div>this line is wrong, read the tcl-commands.doc about binds<div class="codebox"><p>Code: </p><pre><code>proc pub_slap { nick uhost hand dest keyword text } { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Thu May 01, 2003 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-05-01T13:17:17-04:00</updated>

		<published>2003-05-01T13:17:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19697#p19697</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19697#p19697"/>
		<title type="html"><![CDATA[need help with my tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19697#p19697"><![CDATA[
Can someone tell me whats wrong with my code?<br>this is the error i got.<br><br>TCL error [pub_slap]: no value given for parameter "keyword" to "pub_slap"<br><br><br>#### Revenge - Slap - Start ####<br><br>bind ctcp - "ACTION" pub_slap<br><br>set slapreply {<br>  "reply 1"<br>  "reply 2"<br>  "reply 3"<br>  "reply 4"<br>  "reply 5"<br>}<br><br>proc pub_slap { nick uhost hand dest chan keyword text } {<br>     global botnick<br>     global slapreply<br>     if {[string index $dest 0] != "#"} { return 0 }<br>     if {[lindex $text 1] == "slaps"} {<br>      if {[lindex $text 1] == $botnick} {<br>        putserv "PRIVMSG $chan :[lindex $slapreply [rand [llength $slapreply]]]"<br>      }<br>     }<br> }<br><br>#### Revenge - Slap - End ####<p>Statistics: Posted by Guest — Thu May 01, 2003 1:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
