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

	<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-31T10:50:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-03-31T10:50:08-04:00</updated>

		<published>2004-03-31T10:50:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35115#p35115</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35115#p35115"/>
		<title type="html"><![CDATA[read file and foreach line bind trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35115#p35115"><![CDATA[
Hello <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>I need help with a little script I am trying to write<br><br>currently it reads a file (format: index content) and binds foreach index a trigger like !index and now i am trying to bring out the stuff saved in content<br><br>like<br><br>Me:  !test<br>Bot: content of test<br><br>the problem is i don't know how to do that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>i can bind it but it wont give me the output<br><br>current script <br><blockquote class="uncited"><div>bind pub m|m !ctrigs create:triggers<br><br>proc create:triggers {nich uhost hand chan arg} {<br>global eglrn<br><br>set chid [open $eglrn(dbfile) r+]<br>while {![eof $chid]} {<br>set line [gets $chid]<br>set first [lindex [split $line] 0]<br>set second [lrange [split $line] 1 end]<br>if {$first != ""} {<br>dccbroadcast "debug: creating trigger for =&gt; $first"<br>bind pub - !$first getInfo:$first<br><br>set content($first) $second<br>proc getInfo:$first {nich uhost hand chan arg} {<br>puthelp "PRIVMSG $chan : {$line}"<br>}<br>dccbroadcast "debug: trigger for =&gt; $first ... added"<br>}<br>}<br>close $chid<br>}</div></blockquote>thx 4 your help<p>Statistics: Posted by Guest — Wed Mar 31, 2004 10:50 am</p><hr />
]]></content>
	</entry>
	</feed>
