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

	<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-09-18T09:48:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ckin-]]></name></author>
		<updated>2003-09-18T09:48:27-04:00</updated>

		<published>2003-09-18T09:48:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27249#p27249</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27249#p27249"/>
		<title type="html"><![CDATA[Need help with a lil script adding.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27249#p27249"><![CDATA[
Hi, n00b d00d in the house :p<br>I got this script from a friend so that on a cmd in the chan the bot will pm the text in a txt file, as u can see in the script heh<br><br>Thing is I got the bot in more than one chan, so if I do the cmd in any chan it will pm the user who executes the cmd, but I only whant it to respond on that sertain command in just one specific chan.<br>Prob I have no clue how to add it in the script bellow so it will only respond to that command in lets say channel #blah and not in all the chans the bot is in.<br><br>I know I know, I should learn how to code tcl but I suck at any learning [censored], I´ve tried a few set chan cmds etc from looking at other scripts but no luck yet.<br><br>Appreciate if anyone could help me out <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>TIA<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !txt show_txt  proc show_txt {nick uhost hand chan arg} {  global sections cmdpre dver if {![file exist /usr/home/blah/eggdrop/scripts/txt]} {      putserv "NOTICE $nick : txtfiles is missing"      return 0  }  set htopic [lindex $arg 0]  if {$htopic == ""} {     set txtfile [open /usr/home/blah/eggdrop/scripts/txt r]     set txtdb [read $txtfile]     close $txtfile     foreach line [split $txtdb "\n"] {         if {$line != ""} {                 putserv "PRIVMSG $nick :\00314$line"         }     }  } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3818">ckin-</a> — Thu Sep 18, 2003 9:48 am</p><hr />
]]></content>
	</entry>
	</feed>
