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

	<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-06-02T06:25:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T06:25:59-04:00</updated>

		<published>2003-06-02T06:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21081#p21081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21081#p21081"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21081#p21081"><![CDATA[
So basicaly wich is wich? I failed to understand what you mean by the things you've said at the begining, oh well.. Some things are made not to be understood, just to be done/executed <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=187">caesar</a> — Mon Jun 02, 2003 6:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-06-02T04:50:51-04:00</updated>

		<published>2003-06-02T04:50:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21068#p21068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21068#p21068"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21068#p21068"><![CDATA[
This has the be the first and last Monday morning in existance that you or any1 will ever get some good stuff from me. No I didn't get some last night, though that would have set you up for a week of good stuff <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><div class="codebox"><p>Code: </p><pre><code>if {![info exists arewealive]} {  catch {unbind dcc n die *dcc:die}  bind dcc n die our:dcc:die  rename die our:die  proc die {rsn} {    our:dcc:die $::botnick 0 $rsn  }}set arewealive 1proc our:dcc:die {hand idx arg} {  set a 0  set b 0  foreach x [binds evnt] {    if {![string equal -nocase [lindex $x 2] predie]} { continue }    incr a    incr [numberize [[lindex $x 4] $hand $arg]]  }  if {$a == $b} { die "($hand) $arg" }}proc numberize {n} {  if {$n == ""} { return 0}  if {$n == "0"} { return 0 }  return 1}</code></pre></div>This is untested<br><br>You use it by using the EVNT bind, and saying you wish to trigger the "predie" event.<br><br>EG<div class="codebox"><p>Code: </p><pre><code>bind EVNT - predie my:event:proc</code></pre></div>You code will be called with 2 arguments, the handle of the person doing this, or the nickname of the bot (when the Tcl die command is triggered), and the reason.<br><br>Your code should return 1 if you wish for the bot to exit normaly, and 0 if your wish to stall the exiting.<br><br>This will allow you to use some form of security script, to require a password to die, or to confirm the die.<br><div class="codebox"><p>Code: </p><pre><code>proc my:die:function {hand rsn} {  if {![matchattr $hand Z]} { return 0 }  if {([uptime] - $uptime) &lt; 600} { return }  return 1}bind EVNT - predie my:die:function</code></pre></div>Do not die if the user does not have customer flag Z<br>Do not die if the bot has been online less than 10 mins.<br>Otherwise say that we are willing to let the bot die (note, other procedures you may not).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Jun 02, 2003 4:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T00:54:35-04:00</updated>

		<published>2003-06-02T00:54:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21056#p21056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21056#p21056"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21056#p21056"><![CDATA[
As far as I can see there is no such binding for what you've asked. You still can rebind the .die in another proc, save your stuff then complete the die. See the bind filt in the docs/tcl-commands.doc file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 12:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cez]]></name></author>
		<updated>2003-06-01T18:24:38-04:00</updated>

		<published>2003-06-01T18:24:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21050#p21050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21050#p21050"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21050#p21050"><![CDATA[
hmm doesnt work it seems, tried like this and did a .die from telnet<div class="codebox"><p>Code: </p><pre><code>bind evnt -|- sighup quitbind evnt -|- sigterm quitbind evnt -|- sigill quitbind evnt -|- rehash quitbind evnt -|- prerehash quitbind evnt -|- prerehash quitbind evnt -|- prerestart quitproc quit { type } {   putlog "got event, $type"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3232">cez</a> — Sun Jun 01, 2003 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-06-01T15:03:09-04:00</updated>

		<published>2003-06-01T15:03:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21035#p21035</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21035#p21035"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21035#p21035"><![CDATA[
check the <span style="text-decoration:underline">bind evnt</span> in tcl-commands.doc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Jun 01, 2003 3:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cez]]></name></author>
		<updated>2003-06-01T14:46:24-04:00</updated>

		<published>2003-06-01T14:46:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21034#p21034</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21034#p21034"/>
		<title type="html"><![CDATA[catch die in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21034#p21034"><![CDATA[
is there some bind i could do to run a process when catching a .die so that i can save some stuff which i dont want to do every time the value changes??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3232">cez</a> — Sun Jun 01, 2003 2:46 pm</p><hr />
]]></content>
	</entry>
	</feed>
