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

	<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-03T20:33:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-03T19:52:46-04:00</updated>

		<published>2003-09-03T19:52:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26411#p26411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26411#p26411"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26411#p26411"><![CDATA[
Problem solved, spoke to user and found out it was an error in my ini_read, everything is all fixed now, thanks everyone for the help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Wed Sep 03, 2003 7:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T20:33:04-04:00</updated>

		<published>2003-09-03T19:33:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26409#p26409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26409#p26409"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26409#p26409"><![CDATA[
Hey! Don't blame my code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>I recommend rewriting that last proc you pasted...writing the file and reading it and then deleting it from within the same proc makes no sense. and since you delete it before you close it, it's not even deleted <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Add this to your interpreter to find out who's forgetting to close files:<div class="codebox"><p>Code: </p><pre><code>if {![string len [info procs open]]} {rename open _openrename close _closeproc open {args} {if {[info level]&gt;1} {set by [info level -1]} {set by "global"}set f [_open openlog.txt a+]puts $f "open [join $args] ($by)"_close $fuplevel 1 [concat _open $args]}proc close {args} {if {[info level]&gt;1} {set by [info level -1]} {set by "global"}set f [_open openlog.txt a+]puts $f "close [join $args] ($by)"_close $fuplevel 1 [concat _close $args]}}</code></pre></div>It will create a file called 'openlog.txt' with a line for each open and close done. This should make it fairly easy to find out where you've screwed up. Just let the script run for a while and check the file for opens missing closes.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Sep 03, 2003 7:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-03T19:04:19-04:00</updated>

		<published>2003-09-03T19:04:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26408#p26408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26408#p26408"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26408#p26408"><![CDATA[
Oh yea, and the scripts will continue to work, I just can't login to the bot, not even through telnet.<br><br>I am getting TONS of file channels left open though, according to .tcl file channels<br><br>Wish I had a script to tell me where the holes were though, cuz the way I see it, I have everything closed up tightly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Wed Sep 03, 2003 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-03T18:53:09-04:00</updated>

		<published>2003-09-03T18:53:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26407#p26407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26407#p26407"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26407#p26407"><![CDATA[
Oh and here is one of the proc's that is causing the bot to leave open files etc<br><div class="codebox"><p>Code: </p><pre><code>proc botlist {nick uhost hand chan args} {  global mainchanbots inifilebots  if {$chan == $mainchanbots} {  foreach {name value} [parseIni bots.ini] {     set check [ini_read bots.ini ${name} location]    set displayname [ini_read $inifilebots ${name} display]    set fs [open botlist.tmp a+]    puts -nonewline $fs "$displayname "    close $fs  }  set fs [open botlist.tmp r]   while {[gets $fs line]&gt;-1} {        set displayname [lsort -dict [lrange $line 0 end]]       putquick "PRIVMSG $mainchanbots :\002Loaded Bots\:\002\0032 $displayname\003"      }     file delete "botlist.tmp"     close $fs     return 0   }    return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Wed Sep 03, 2003 6:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-03T18:51:55-04:00</updated>

		<published>2003-09-03T18:51:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26406#p26406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26406#p26406"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26406#p26406"><![CDATA[
Ok, after reviewing my scripts, I have narrowed the problem down to when I call this proc through my scripts<br><div class="codebox"><p>Code: </p><pre><code>proc parseIni {file} {    array set arr {}    set f [open $file]    while {[gets $f l]&gt;-1} {       set l [string trim $l]       if {[string match {\[*\]} $l]} {          set e [string range $l 1 end-1]      } elseif {[info exists e]&amp;&amp;[string match *?=?* $l]} {          regexp {^([^=]+)=(.+)$} $l a a b          lappend arr($e) [string trim $a] [string trim $b]       }   }    close $f    array get arr } </code></pre></div>If this isn't the problem, then I don't know, I got about a billion return's everywhere, and its not fixing it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Wed Sep 03, 2003 6:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T11:05:15-04:00</updated>

		<published>2003-09-03T11:05:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26328#p26328</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26328#p26328"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26328#p26328"><![CDATA[
Do you have any scripts triggered by a "bind chon"? If not, I bet it's due to unclosed file channels. Are your scripts (the ones reading from files) working when this problem occurs? Check '.tcl file channels' when your bot has been running for a while (should return 'stdin stdout stderr' if everything's fine (and you don't have any script MEANT to leave files open, of course))<br>If you're logging, did you check your log(s) for errors?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Sep 03, 2003 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TeDDyBeeR]]></name></author>
		<updated>2003-09-03T10:46:37-04:00</updated>

		<published>2003-09-03T10:46:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26327#p26327</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26327#p26327"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26327#p26327"><![CDATA[
Well, try to look good, it can be happend that your bot is hanging in one of the loops.<br><br>Maybe a good idea to let me see thous loops, maybe i can help you or searhc for errors or maybe what coust the hang...<br><br>regards,<br>TeDDyBeeR<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3774">TeDDyBeeR</a> — Wed Sep 03, 2003 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-02T18:44:35-04:00</updated>

		<published>2003-09-02T18:44:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26282#p26282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26282#p26282"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26282#p26282"><![CDATA[
I have a couple loops setup,but looking at the code, they should be fine.<br><br>And seeing as I can't log into the bot period, I have to kill it from the shell and restart it completely.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Tue Sep 02, 2003 6:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TeDDyBeeR]]></name></author>
		<updated>2003-09-02T10:05:18-04:00</updated>

		<published>2003-09-02T10:05:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26198#p26198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26198#p26198"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26198#p26198"><![CDATA[
hello Darkj,<br><br>Do you have load TCL's whit a loop or someting ?<br><div class="codebox"><p>Code: </p><pre><code> like :  while {$x &lt; $z} {    .... }or : for {set x 0} {$x&lt;10} {incr x} {     .... }</code></pre></div>It can happens that the script hangs because he never end in the loops<br><br>Also : how did you restarted it agian, just by the partyline command<br><strong class="text-strong">.restart</strong> or just killed the bot on the shell ?<br><br>regards...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3774">TeDDyBeeR</a> — Tue Sep 02, 2003 10:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-02T09:07:15-04:00</updated>

		<published>2003-09-02T09:07:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26183#p26183</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26183#p26183"/>
		<title type="html"><![CDATA[need more assistance]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26183#p26183"><![CDATA[
Ok, I imagine this bug is because my scripts aren't ending properly, but basically here is what is happening:<br><br>When i start my bot I can usually DCC to it just fine, and do rehash's etc to adjust scripts.  Now I notice if I leave my bot up overnight, and try to DCC it again, it does this:<br><br>Waiting for acknowledgement...<br>DCC Chat connection established<br>&lt;BotName&gt; Enter your password.<br><br>So I enter my password, and nothing, it just sits there, the only way for it to actually work again is I have to restart my bot.  Is there a way I can check for errors in my scripts, or ways to check the scripts that haven't exitted properly?  Help would be appreciated (I hope I put this in the right forum)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Tue Sep 02, 2003 9:07 am</p><hr />
]]></content>
	</entry>
	</feed>
