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

	<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-06-17T01:28:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-17T01:28:00-04:00</updated>

		<published>2002-06-17T01:28:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8067#p8067</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8067#p8067"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8067#p8067"><![CDATA[
nah, you really didnt mess up <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile">  i'm still learning, shoulda picked it up myself<br><br>thanks for the help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><p>Statistics: Posted by Guest — Mon Jun 17, 2002 1:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-17T01:08:00-04:00</updated>

		<published>2002-06-17T01:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8065#p8065</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8065#p8065"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8065#p8065"><![CDATA[
Oh I messed up.<br><br>if {[lsearch [chanlist $chan] $text] == -1} {return 0}<br><br>(the ] was in the wrong place)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Jun 17, 2002 1:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-16T21:04:00-04:00</updated>

		<published>2002-06-16T21:04:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8061#p8061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8061#p8061"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8061#p8061"><![CDATA[
i added the line inside proc dork, when called the bot reports:<br><br>Tcl error [dork]: wrong # args: should be "lsearch ?mode? list pattern"<br><br>if i put the new line outside proc, bot has a hissyfit, so i'm fairly confident i have it in the right place<br><div class="codebox"><p>Code: </p><pre><code>proc dork {nick uhost hand chan text} { global ranhng if {[lsearch [chanlist $chan $text]] == -1} {return 0}set nick $textset idx [rand [llength $ranhng]] set line [subst [lindex $ranhng $idx]] putchan $chan "$line, $nick" return 0 }</code></pre></div><p>Statistics: Posted by Guest — Sun Jun 16, 2002 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-16T17:45:00-04:00</updated>

		<published>2002-06-16T17:45:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8059#p8059</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8059#p8059"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8059#p8059"><![CDATA[
Add this:<br><br>if {[lsearch [chanlist $chan $text]] == -1} {return 0}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jun 16, 2002 5:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-16T08:01:00-04:00</updated>

		<published>2002-06-16T08:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8050#p8050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8050#p8050"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8050#p8050"><![CDATA[
thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br>took me a while of headscratching to figure out that the new line goes inside the proc <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>what if i was to go a step further and have the script check the current channel people and only react if the target's there?  tried reading other people's scripts for ideas/working examples, seems to be a lack of uniformity <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by Guest — Sun Jun 16, 2002 8:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-16T07:31:00-04:00</updated>

		<published>2002-06-16T07:31:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8047#p8047</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8047#p8047"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8047#p8047"><![CDATA[
Oh, I didn't see the last part. To make it use the argument instead of the caller, add "set nick $text" as the first line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jun 16, 2002 7:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-16T07:29:00-04:00</updated>

		<published>2002-06-16T07:29:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8045#p8045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8045#p8045"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8045#p8045"><![CDATA[
ranhng - random horny net geek<br>dork - explanatory <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br>the channel's swamped with the obvious types in question, my bot's already developed an attitude <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>thanks for the code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><p>Statistics: Posted by Guest — Sun Jun 16, 2002 7:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-16T07:19:00-04:00</updated>

		<published>2002-06-16T07:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8043#p8043</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8043#p8043"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8043#p8043"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc dork {nick uhost hand chan text} {  global ranhng  set idx [rand [llength $ranhng]]  set line [subst [lindex $ranhng $idx]]  putchan $chan "$line, $nick"  return 0}</code></pre></div>Btw, if you want to write a good script, you should choose meaningful names for commands and variables. "Ranhng" and "dork" just aren't cutting it, I'm afraid <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=8">stdragon</a> — Sun Jun 16, 2002 7:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-16T02:08:00-04:00</updated>

		<published>2002-06-16T02:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8042#p8042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8042#p8042"/>
		<title type="html"><![CDATA[simple request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8042#p8042"><![CDATA[
i have a small script that i'd like to fix up so the trigger command accepts an argument and process the argument as a user in the channel.  so far it looks like this:<br><br>set ranhng {<br>  "Let me bow down to thee, Oh magnificent $nick!  Dom me, use me with your leet skillz, "<br>  "Yay...another HNG...sigh...you bore me already, "<br>  "You know, if you shut up and listen very very carefully...we can hear your mother calling, "<br>}<br><br>bind pub - !hng dork<br><br>proc dork {nick uhost hand chan $rand} {<br>  global ranhng<br>  putchan $chan "[lindex $ranhng [rand [llength $ranhng]]]$hand"; return 0<br>}<br><br>when the script is called (!hng blahblah), i only get myself returned as the victim.  what would i do to make the insult against a victim instead of who calls the trigger?<p>Statistics: Posted by Guest — Sun Jun 16, 2002 2:08 am</p><hr />
]]></content>
	</entry>
	</feed>
