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

	<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-02T10:21:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-02T10:21:34-04:00</updated>

		<published>2003-09-02T10:21:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26201#p26201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26201#p26201"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26201#p26201"><![CDATA[
hm, I don't even really understand what it is doing exactly. lol ...<br><br>I will look at the mans <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>thx for your help ((:<p>Statistics: Posted by Guest — Tue Sep 02, 2003 10:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-09-02T09:50:56-04:00</updated>

		<published>2003-09-02T09:50:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26194#p26194</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26194#p26194"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26194#p26194"><![CDATA[
I got this and more from the Tcl manual (search for "tcl/tk man" on google, and hit "Am I feeling lucky")<br><br>There probably is a way. You following would need some major adaption, but could work<br><div class="codebox"><p>Code: </p><pre><code>if {![info exists _bindgone]} {  set _bindgone 1  rename bind _bindproc bind {args} {  set cmd [lindex $args [expr [llength $args] - 1]]  set body "record_stack; "  if {[string range [info body $cmd] 0 [expr [string length $body] - 1]] != $body} {    append body [info body $cmd]    proc $cmd [info args $cmd] $body  }  eval _[info level 0]}}proc record_stack {} {   lappend ::_stack [info level -1] }</code></pre></div>That should be loaded as you first script (ie, just before all others).<br><br>It likely won't work or I have misunderstood somthign around the eval code, but the idea is sound.<br><br>It replaces the bind command with a custom version. When it is called, it makes sure that the new code includes the "record_stack" command (making sure it isn't duplicate).<br><br>It would have been easier to use the redo the proc command, however, that would mean every command is stacked, and not just binds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Sep 02, 2003 9:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-02T09:12:12-04:00</updated>

		<published>2003-09-02T09:12:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26185#p26185</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26185#p26185"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26185#p26185"><![CDATA[
<blockquote class="uncited"><div>The stack is a list stored in the global variable $_stack. It is recorded in a fasion of last oldest item at the start, newest at the end.</div></blockquote>thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> I will play with this tonight. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> (i'm from germany (GMT+1)) ;o)<br><br>but, ppslim, where did you learn that? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised">)<br>and, what is "info level -1" for? (o:<br><br>and, that means I have to add record_stack to all procs I want to have<br>recorded?<br>well, is there a way to have this beeing done automatically? so, if<br>someone loads the script, it records all procs executed, no matter in<br>which script, without having to add record_stack to every proc which might<br>cause a "channel :you don't have operator rights" error?<br><br>thx for help ;DD<p>Statistics: Posted by Guest — Tue Sep 02, 2003 9:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-09-02T05:33:10-04:00</updated>

		<published>2003-09-02T05:33:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26177#p26177</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26177#p26177"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26177#p26177"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc record_stack {} {  lappend ::_stack [info level -1]}</code></pre></div>This will help record a stack of previous binds.<br><br>You will have to call record_stack at the begining of each bind, so that recording takes place.<br><br>You will also have to take care of cleaning the stack, so it doesn't grow too large. Presently, it will grow forever.<br><br>The stack is a list stored in the global variable $_stack. It is recorded in a fasion of last oldest item at the start, newest at the end.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Sep 02, 2003 5:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-09-02T04:59:40-04:00</updated>

		<published>2003-09-02T04:59:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26176#p26176</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26176#p26176"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26176#p26176"><![CDATA[
way a) you would have to add it manual to each proc<div class="codebox"><p>Code: </p><pre><code>proc myproc { arg1 arg2 arg3 } {global lastprocset lastproc "myproc $arg1 $arg2 $arg3"....}proc repeat_last { } {eval [$::lastproc]}</code></pre></div>way b) include this: <div class="codebox"><p>Code: </p><pre><code>proc opme { nick hand uhost chan text } {if {![isop $::botnick $chan]} { &lt;the cmd to op your bot via chanserv&gt; ; utimer 5 "opme $nick $hand $uhost $chan $text" ; return 0 } else {&lt;the stuff to op the user&gt;}}</code></pre></div>not tested, but it should work (at least with some small adjustments)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Tue Sep 02, 2003 4:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-01T20:27:09-04:00</updated>

		<published>2003-09-01T20:27:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26157#p26157</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26157#p26157"/>
		<title type="html"><![CDATA[catching binds]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26157#p26157"><![CDATA[
Hi all. I was wondering if it is possible (without patching eggdrop)<br>to have the last bind used stored in a variable.<br>I'd need not only the lastbind variable, but also the parameters the proc,<br>which the bind triggered, got triggered with. (n uh h c text f.e.)<br><br>So, if f.e. the bot wants to voice someone, and gets the RAW-error that it<br>doesn't have op in 'channel', it ops itself via chanserv or some other<br>network channel-service, and triggers the last bind (which is probably<br>responsible for the RAW-error) again.<br><br>Thanks for helping ;DD<br><br>~freaky <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 — Mon Sep 01, 2003 8:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
