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

	<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-10-13T03:31:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-13T03:31:03-04:00</updated>

		<published>2002-10-13T03:31:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11938#p11938</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11938#p11938"/>
		<title type="html"><![CDATA[this is awfull]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11938#p11938"><![CDATA[
no...not only if i add url in 4 lines by using copy paste, this error also appear even if i add url one by one. It said to many open files:<br><br>[00:19] Tcl error [newz]: couldn't open "/blah/blah/file(2)": too many open files<br>[00:19] Tcl error in script for 'timer7077':<br>[00:19] couldn't open "/blah/blah/file(3)": too many open files<br><br><br>but <br><br>if {![file exists files(1)]} { set f [open $files(1) a+]; close $f } <br>if {![file exists files(2)]} { set f [open $files(2) a+]; close $f } <br>if {![file exists files(3)]} { set f [open $files(3) a+]; close $f } <br>if {![file exists files(4)]} { set f [open $files(4) a+]; close $f } <br>and <br><br>seek $a 0 end<br>seek $c 0 end<br>seek $e 0 end<br>seek $g 0 end<br>catch {close $a} <br>catch {close $c} <br>catch {close $e}<br>catch {close $g}<br><br>should close files that have been opened before Right?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br>how to prevent this error apear again? arrrrgggg...pls....i need help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by Guest — Sun Oct 13, 2002 3:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-13T03:11:00-04:00</updated>

		<published>2002-10-13T03:11:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11937#p11937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11937#p11937"/>
		<title type="html"><![CDATA[error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11937#p11937"><![CDATA[
i dont understand....if i add more than 4 lines url, seems this error bugging me sometimes, and makes me have to restart my bot:<br><br>[23:58] Tcl error [newz]: couldn't open "/blah/blah/file(4)": too many open files<br><br>is this bugs <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by Guest — Sun Oct 13, 2002 3:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-10T05:15:11-04:00</updated>

		<published>2002-10-10T05:15:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11859#p11859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11859#p11859"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11859#p11859"><![CDATA[
cool... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br>but...i think my bot became quite slow to respon after i add something, dont you think so?<p>Statistics: Posted by Guest — Thu Oct 10, 2002 5:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-08T03:21:54-04:00</updated>

		<published>2002-10-08T03:21:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11792#p11792</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11792#p11792"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11792#p11792"><![CDATA[
I tested exactly that script on my bot.. all I changed was ofc the files and I added this:<div class="codebox"><p>Code: </p><pre><code>if {![file exists files(1)]} { set f [open $files(1) a+]; close $f } if {![file exists files(2)]} { set f [open $files(2) a+]; close $f } if {![file exists files(3)]} { set f [open $files(3) a+]; close $f } if {![file exists files(4)]} { set f [open $files(4) a+]; close $f } </code></pre></div>it worked like a charm...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Tue Oct 08, 2002 3:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-08T02:51:08-04:00</updated>

		<published>2002-10-08T02:51:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11791#p11791</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11791#p11791"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11791#p11791"><![CDATA[
i tried that, put $a $text, but the result is still the same, my bot cannot detect either  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> <br><br>maybe this code cannot detect more than one file, and only work and detect 1 file, though theorical and logically this code should work, but in practice, things dont always match with theory<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused">  <br><br>i dont know, maybe there's some code I missed, so guys...do you mind to correct this code below or maybe test it, maybe there's something missing on it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>set files(1) "/eggdrop/scripts/newfile"<br>set files(2) "/eggdrop/scripts/c"<br>set files(3) "/eggdrop/scripts/b"<br>set files(4) "/eggdrop/myscripts/a"<br><br>proc newz {nick host hand text} { <br>global files<br>set a [open $files(1) r+] <br>set b [read $a]<br>set c [open $files(2) r+]<br>set d [read $c]<br>set e [open $files(3) r+]<br>set f [read $e]<br>set g [open $files(4) r+]<br>set h [read $g]<br><br>if {[string match -nocase "*$text*" $b] || [string match -nocase "*$text*" $d] || [string match -nocase "*$text*" $f] || [string match -nocase "*$text*" $h]} { <br>return 0 <br>}<br>seek $a 0 end<br>seek $c 0 end<br>seek $e 0 end<br>seek $g 0 end<br>puts $a $text<br>catch {close $a} <br>catch {close $c} <br>catch {close $e}<br>catch {close $g}<br>} <br><br>putlog "test.tcl loaded"<p>Statistics: Posted by Guest — Tue Oct 08, 2002 2:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-04T02:52:44-04:00</updated>

		<published>2002-10-04T02:52:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11697#p11697</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11697#p11697"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11697#p11697"><![CDATA[
hey u didn't follow my code....<br>yours:<div class="codebox"><p>Code: </p><pre><code>} seek $a 0 end seek $c 0 end seek $e 0 end puts $a {text} catch {close $a} catch {close $c} catch {close $e} } </code></pre></div>mine:<div class="codebox"><p>Code: </p><pre><code>} seek $a 0 end seek $c 0 end seek $e 0 end puts $a $text catch {close $a} catch {close $c} catch {close $e}}</code></pre></div>do you see the difference here? Tou are putting only the string "text" in the file... not the variable $text..... so u can type your url as many times as you want, bu tit will still just put "text" in the file<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Oct 04, 2002 2:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-10-03T15:41:53-04:00</updated>

		<published>2002-10-03T15:41:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11675#p11675</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11675#p11675"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11675#p11675"><![CDATA[
1) You need to close those files in the:<br><br>f {[string match -nocase "*$text*" $b]||[string match -nocase "*$text*" $d]||[string match -nocase "*$text*" $f]} { <br>close $a<br>Close $c<br>close $e<br>return<br>}<br><br>2) Did you try: putlog "$b $d $f"<br>So to check the actuall stuff you read?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Thu Oct 03, 2002 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-03T03:14:56-04:00</updated>

		<published>2002-10-03T03:14:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11636#p11636</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11636#p11636"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11636#p11636"><![CDATA[
set files(1) "/blah/blah/new"<br>set files(2) "/blah/blah/file1"<br>set files(3) "/blah/blah/file2"<br><br>proc add_url {nick host hand text} { <br>global files<br>set a [open $files(1) r+] <br>set b [read $a]<br>set c [open $files(2) r+]<br>set d [read $c]<br>set e [open $files(3) r+]<br>set f [read $e]<br><br>if {[string match -nocase "*$text*" $b]||[string match -nocase "*$text*" $d]||[string match -nocase "*$text*" $f]} { <br>return 0 <br>}<br>seek $a 0 end<br>seek $c 0 end<br>seek $e 0 end<br>puts $a {text}<br>catch {close $a} <br>catch {close $c} <br>catch {close $e}<br>}<br><br>do you mean like this?<br>but it still didnt work, my bot even cannot detect if the url is on those files?<br>think i have already give up and so depert <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> , sorry to disturb you guys, but thx for helped me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Thu Oct 03, 2002 3:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-02T06:21:32-04:00</updated>

		<published>2002-10-02T06:21:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11607#p11607</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11607#p11607"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11607#p11607"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>} seek $a 0 end seek $c 0 end seek $e 0 end puts $a {text} catch {close $a}</code></pre></div>alot of bugs here <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>u are forgetting to close all the files.. <br>and the only thing u are putting into the file are the string "text"<br>should be<div class="codebox"><p>Code: </p><pre><code>} seek $a 0 end seek $c 0 end seek $e 0 end puts $a $textcatch {close $a} catch {close $c} catch {close $e}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Oct 02, 2002 6:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-02T06:06:58-04:00</updated>

		<published>2002-10-02T06:06:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11606#p11606</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11606#p11606"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11606#p11606"><![CDATA[
may I ask why you are using 4 files?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Oct 02, 2002 6:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-02T06:04:16-04:00</updated>

		<published>2002-10-02T06:04:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11605#p11605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11605#p11605"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11605#p11605"><![CDATA[
hmm...i try to write like this:<br><br><br>set files(1) "/blah/blah/new.txt"<br>set files(2) "/blah/blah/file3.txt"<br>set files(3) "/blah/blah/file2.txt"<br>set files(4) "/blah/blah/file1.txt"<br><br>if {![file exist files(1)]} { set f [open $files(1) a+]; close $f } <br>if {![file exist files(2)]} { set f [open $files(2) a+]; close $f } <br>if {![file exist files(3)]} { set f [open $files(3) a+]; close $f } <br>if {![file exist files(4)]} { set f [open $files(4) a+]; close $f }<br><br>proc add_url {nick host hand text} { <br>global files<br>set a [open $files(1) r+]<br>set b [read $a]<br>set c [open $files(2) r+]<br>set d [read $c]<br>set e [open $files(3) r+]<br>set f [read $e]<br>if {[string match -nocase "*$text*" $b]||[string match -nocase "*$text*" $d]||[string match -nocase "*$text*" $f]} { <br>return 0 <br>}<br>seek $a 0 end<br>seek $c 0 end<br>seek $e 0 end<br>puts $a {text}<br>catch {close $a}<br><br>but my bot only detect if the url already on new file, then i add a different url (that not exist in new file but already exist in file1) example <a href="http://bot.com" class="postlink">http://bot.com</a>, my bot cant detect it and then add it to new file, even if i add it again, the bot still add it to new file (so, <a href="http://bot.com" class="postlink">http://bot.com</a> becomes double in new file)<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by Guest — Wed Oct 02, 2002 6:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-02T05:05:18-04:00</updated>

		<published>2002-10-02T05:05:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11603#p11603</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11603#p11603"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11603#p11603"><![CDATA[
do like this:<div class="codebox"><p>Code: </p><pre><code>set files(1) "/home/blah/blah/file1"set files(2) "/home/blah/blah/file2"set files(3) "/home/blah/blah/file3"## etc.. add as many as u needif {![file exist files(1)]} { set f [open $files(1) a+]; close $f }if {![file exist files(2)]} { set f [open $files(1) a+]; close $f }if {![file exist files(3)]} { set f [open $files(1) a+]; close $f }## etc.. must match the number of filesproc add_url {nick host hand text} { global filesset a [open $files(1) r+] set b [read $a] set c [open $files(2) r+]## etc... u have to open and read the files one by one</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Oct 02, 2002 5:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-02T04:13:39-04:00</updated>

		<published>2002-10-02T04:13:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11602#p11602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11602#p11602"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11602#p11602"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"> ???<br>do you mean i must add <br>if {![file exist file]} { set f [open $file a+]; close $f }<br>above set a [open $files r+] line??<br><br>I try to put it but it still appear error message same with the last, then i try to put it bellow set b [read $a] line, but it show error [01:07] Tcl error [add_url]: invalid command name "files"<br><br><br><br>can u more specify where i must do?? i'm still really confuse  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br><br>thx<p>Statistics: Posted by Guest — Wed Oct 02, 2002 4:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-10-02T02:50:22-04:00</updated>

		<published>2002-10-02T02:50:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11597#p11597</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11597#p11597"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11597#p11597"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set a [open $files r+] </code></pre></div>u have to split up $files before u can read them<br>use:<div class="codebox"><p>Code: </p><pre><code>if {![file exist file]} { set f [open $file a+]; close $f }</code></pre></div>to check if a file exsits<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Oct 02, 2002 2:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-02T02:41:07-04:00</updated>

		<published>2002-10-02T02:41:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11595#p11595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11595#p11595"/>
		<title type="html"><![CDATA[Request Help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11595#p11595"><![CDATA[
is this can check some file too? I mean bot can check url in some file (file1,file2,newfile) and if doesnt exist, then the bot add it to newfile<br><br>i try to write like this:<br><br>set files {<br>{/home/blah/blah/file1}<br>{/home/blah/blah/file2}<br>{/home/blah/blah/newfile}<br><br>set file "/home/blah/blah/newfile"<br><br>proc add_url {nick host hand text} { <br>global files file<br>set a [open $files r+] <br>set b [read $a]<br>set c [open $file r+]<br><br>if {[string match -nocase "*$text*" $b]} {<br>return 0 <br>}<br>puts $c {text}<br>catch {close $a} <br><br>but it didnt work and an error message appear:<br><br>[14:41] Tcl error [add_url]: couldn't open "<br>{/home/blah/blah/file1}<br>{/home/blah/blah/file2}<br>{/home/blah/blah/newfile}<br>": no such file or directory<br><br>what's wrong? is there any missing code i put??<br>thx<p>Statistics: Posted by Guest — Wed Oct 02, 2002 2:41 am</p><hr />
]]></content>
	</entry>
	</feed>
