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

	<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>2001-09-25T12:03:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-25T12:03:00-04:00</updated>

		<published>2001-09-25T12:03:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15#p15</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15#p15"/>
		<title type="html"><![CDATA[PLease help with small script edit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15#p15"><![CDATA[
<br>Oh .. nevermind, hehe I just added that line in the wrong spot.  It is working now. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":eek:" title="Surprised">) <br><br>Thanks again !<br><br><p>Statistics: Posted by Guest — Tue Sep 25, 2001 12:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-25T11:31:00-04:00</updated>

		<published>2001-09-25T11:31:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14#p14</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14#p14"/>
		<title type="html"><![CDATA[PLease help with small script edit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14#p14"><![CDATA[
<br>Thanks ppslim - BUT, I added:<br><br>Code:<br>--------------------------------------------------------------------------------<br> <br>if {[string tolower "#channel"] != [string tolower $chan]} { return }<br><br> <br><br>--------------------------------------------------------------------------------<br> <br>And when I rehashed I get this error:<br><br>[00:58] can't read "chan": no such variable<br>    while executing<br>"string tolower $chan"<br>    (file "scripts/ccbnc.tcl" line 6)<br>    invoked from within<br>"source scripts/ccbnc.tcl"<br>    (file "aiplan9" line 1088)<br>[00:58] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)<br><br>I will get you the txt file (edited) later today, but what would cause this error above ?? <br><br>Thanks again !!<br><p>Statistics: Posted by Guest — Tue Sep 25, 2001 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-09-25T10:10:00-04:00</updated>

		<published>2001-09-25T10:10:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13#p13</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13#p13"/>
		<title type="html"><![CDATA[PLease help with small script edit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13#p13"><![CDATA[
To make it one channel only, you could  could add the following to it.<br><div class="codebox"><p>Code: </p><pre><code>if {[string tolower "#channel"] != [string tolower $chan]} { return }</code></pre></div>As for reading only 6 lines, I don't see why. The code sugests that it shoudl read till the end, but you claim it only reads 6 lines. You could paste the exact (with secuity changes, but keep it as original as possible) file, as it may montain some nasty suprises.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Sep 25, 2001 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-25T03:15:00-04:00</updated>

		<published>2001-09-25T03:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6#p6</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6#p6"/>
		<title type="html"><![CDATA[PLease help with small script edit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6#p6"><![CDATA[
<br>hi - <br><br>I have a script that reads a txt file and displays the results in my channel on efnet.<br><br>The script is a !bnc script, that gets current bnc ip's from that txt file.<br><br>The script works fine now, except I need 2 things added to it. ;O) <br><br>1) I need it to only work in 1 channel<br>2) it needs to read lines till the end of file, now its just setup to read 6 lines<br>...and the file length will vary depending on how many bncs are up at any given time.<br><br>If you could PLEASE help me add this bit, I would appreciate it very much !!! <br><br>Here is the tcl now:<br><br># Set this to the filename<br>set dvs_ccbnc_filename "/glftpd/ftp-data/misc/bnclist.msg"<br><br>bind pub -|- !ccbnc dvs_ccbnc_pub:spitlines<br><br>proc dvs_ccbnc_pub:spitlines {nick uhost hand chan text} {<br>global dvs_ccbnc_filename<br><br>set fileid [dvs_func:openfile $dvs_ccbnc_filename]<br>if {$fileid == ""} then {<br>puthelp "NOTICE $nick :Unable to open file for reading."<br>return 0<br>}<br>while {![eof $fileid]} {<br>gets $fileid line<br>puthelp "NOTICE $nick :$line"<br>}<br>close $fileid<br><br>return 1<br>}<br><br>### FILE OPENER ###<br># Opens file gracefully and returns fileid, "" if failed<br>proc dvs_func:openfile {file {mode read} {binary 1}} {<br><br>switch -- $mode<br>read - r {<br>set m r<br>} write - w {<br>set m w<br>} append - a {<br>set m a<br>}<br><br>if {$m == "r" &amp;&amp; (![file exists $file] || ![file readable $file]) || ($m == "w" || $m == "a") &amp;&amp; ![file writable $file] || [catch {set fileid [open $file $m]}]} then {<br>catch {<br># I don't know how the hell it would be possible for $fileid to exist at this point..<br>if {[info exists fileid]} then {<br># But I'm still insane enough to check if it does<br>close $fileid<br>}<br>}<br>return ""<br>}<br><br>if {$binary} then {<br>fconfigure $fileid -encoding binary -translation binary<br>}<br>return $fileid<br>}<br><br><br>Thanks -<br>Crypto<br><p>Statistics: Posted by Guest — Tue Sep 25, 2001 3:15 am</p><hr />
]]></content>
	</entry>
	</feed>
