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

	<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-12-05T13:29:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-05T12:09:10-04:00</updated>

		<published>2003-12-05T12:09:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31108#p31108</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31108#p31108"/>
		<title type="html"><![CDATA[[UNRESOLVED] Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31108#p31108"><![CDATA[
<blockquote class="uncited"><div>trying to add this to the source directly.</div></blockquote>Then there's also "do_tcl" starting at line 699 in tcl.c (used by timers, the old need-chansets and the old init-server)<br>I wouldn't bother trying to implement it in the current dns module as it's being rewritten to fix some concatenation issues (I think...correct me if i'm wrong).<br>PS: you might want to add "UNRESOLVED" to the subject of this thread to get the attention of some c coder <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Dec 05, 2003 12:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-12-05T09:58:51-04:00</updated>

		<published>2003-12-05T09:58:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31101#p31101</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31101#p31101"/>
		<title type="html"><![CDATA[[UNRESOLVED] Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31101#p31101"><![CDATA[
maybe thats a feature for the next eggdrop release...<br><br>i'll try to do this without that much recode of my scripts, trying to add this to the source directly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Fri Dec 05, 2003 9:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-05T03:55:47-04:00</updated>

		<published>2003-12-05T03:55:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31094#p31094</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31094#p31094"/>
		<title type="html"><![CDATA[[UNRESOLVED] Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31094#p31094"><![CDATA[
<blockquote class="uncited"><div>ok, let me se if i get this right...<br>this code replaces the original "bind" proc, right ?</div></blockquote>Yes. So any proc called by a bind leading to an error would have the error displayed by the bindEval proc.<blockquote class="uncited"><div>it's no the target to catch an error invoken with a bind, it's to catch every error (timers, etc).</div></blockquote>That also involves code run based on binds. You'd also have to replace after,timer,utimer,fileeven,dnslookup,source and maybe some more to catch all possible errors. To make this a bit easier on your bot, you could start using namespaces for your scripts and have a debug namespace with these commands replaced that you can source scripts into to debug them. (you'd need to replace commands removing/listing these callbacks too of course...).<br><br>In an ideal world eggdrop would call <a href="http://tcl.tk/man/tcl8.3/TclCmd/bgerror.htm" class="postlink">bgerror</a> (Tcl_BackgroundError) when there's errors in code run by timer,utimer and dnslookup. Then you could just make a proc by that name to have all the async errors displayed. (tcl's internal callback commands call 'bgerror' if it exists)<br>In an ideal world eggdrop would also invoke 'info complete' (Tcl_CommandComplete) before creating binds/timers, so you would not have to wait for an event to happen to get errors about missing braces and such in your command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Dec 05, 2003 3:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-12-05T02:24:36-04:00</updated>

		<published>2003-12-05T02:24:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31093#p31093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31093#p31093"/>
		<title type="html"><![CDATA[[UNRESOLVED] Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31093#p31093"><![CDATA[
ok, let me se if i get this right...<br><br>this code replaces the original "bind" proc, right ?<br><br>it's my fault, i maybe didnt make the question that clear:<br>it's no the target to catch an error invoken with a bind, it's to catch every error (timers, etc).<br><br>ah, damn, it's too late allready, got to catch a reading by the inventor of Knoppix, i'll check back in the evening<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Fri Dec 05, 2003 2:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-04T19:10:23-04:00</updated>

		<published>2003-12-04T19:10:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31080#p31080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31080#p31080"/>
		<title type="html"><![CDATA[Re: Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31080#p31080"><![CDATA[
<blockquote class="uncited"><div>nobody is perfect except user</div></blockquote>Hehe...you need to pay more attention ;P<blockquote class="uncited"><div>i've been searching for a way to catch this errors and puting them onto the botnet. bla bla bla</div></blockquote>This might give you some new ideas <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code>if {![llength [info procs bind]]} {# rename the bind commandrename bind realBind# make our own that rewrite the command part to call our own bindEval procproc bind args {if {[llength $args]==4} {eval realBind [lrange $args 0 2] [list [list bindEval [lindex $args 3]]]} {realBind;# lazy way to produce the right error message :P}}#proc bindEval {cmd args} {if {[catch {eval $cmd $args} re]} {# this is where the error is displayed...# the lrange thing is to remove any trace of this proc in the messageputlog "Error: [join [lrange [split $::errorInfo \n] 0 end-3] \n] (invoked by a bind)"} {set re}}}</code></pre></div>If you need the type,flags and/or mask displayed in the error message too, just pass them along from 'bind' to realBind like i did with the real command to be called. Let's hope I made a mistake so you'll stop thinking i'm perfect  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>And in case you didn't get it; make sure this script is loaded before the binds (calling procs you are debugging) are made <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Dec 04, 2003 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-12-05T13:29:59-04:00</updated>

		<published>2003-12-04T18:16:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31078#p31078</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31078#p31078"/>
		<title type="html"><![CDATA[[UNRESOLVED] Bind error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31078#p31078"><![CDATA[
I'm currently working on my botnet, but when debugging scripts i often get TCL Errors (nobody is perfect except user).<br><br>i've been searching for a way to catch this errors and puting them onto the botnet.<br>but : there is no bind error<br><br>TaKeDa from #eggdrop@IRCNet provided me some nice code, but it would still require to modify every proc in my whole code.<br><br>then i thought there meight be a way to catch this with a new bind.<br>when looking at eggdrop .15's source code i found "static int trigger_bind(const char *proc, const char *param)" (tclhash.c, line 668), i think that would be the point to add a callback / whatever, but i cant code in C, so i'm asking here if anyone has allready done it or is willing to do it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Thu Dec 04, 2003 6:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
