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

	<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>2001-10-10T10:45:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-10T10:45:00-04:00</updated>

		<published>2001-10-10T10:45:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=449#p449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=449#p449"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=449#p449"><![CDATA[
SOmthing like this should work.<br><div class="codebox"><p>Code: </p><pre><code>proc chk:restart {} {  global uptime  if {[expr $uptime + 60] &gt; [unixtime]} {    dcc:linkchan 0 0 {#clan-klyt ETG irc.enterthegame.com 6667}    #ANOTHER command    #Yet another command  }}chk:restartproc need:netsplit {args} {  chk:restart}bind EVNT - "init-server" need:netsplit</code></pre></div>the  0 0  is required for this to work.<br><br>And it was the evnt bind, not the need bind. me bad <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":razz:" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 10, 2001 10:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T10:26:00-04:00</updated>

		<published>2001-10-10T10:26:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=448#p448</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=448#p448"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=448#p448"><![CDATA[
Sorry about the former post's lenght, There must be a bug somewhere in the Forum system!<p>Statistics: Posted by Guest — Wed Oct 10, 2001 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-10T10:22:00-04:00</updated>

		<published>2001-10-10T10:22:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=447#p447</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=447#p447"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=447#p447"><![CDATA[
That looks like the same script pasted over and over again. Send the whole script to <a href="mailto:ppslim@users.sourceforge.net">ppslim@users.sourceforge.net</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 10, 2001 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T10:19:00-04:00</updated>

		<published>2001-10-10T10:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=446#p446</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=446#p446"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=446#p446"><![CDATA[
Can I email the script to You?<br>I think I found it searching for linkchan here on egghelp.org<br><br>I dug into the linkchan.tcl script, heres an axcerpt (Its quite an´extensive script!):<br><div class="codebox"><p>Code: </p><pre><code>proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :[1code]proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}[/code1]032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :[1code]proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}[/code1]033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :[1code]proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}[/code1]033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :[1code]proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}[/code1]033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :[1code]proc linkchan {idx arg} { global debug nick chanlinkchan chanlinknet chanlinknick username realname linkchantrim if {$debug == 1} {putlog "linkchan&lt; $arg"} set arg2 [lindex $arg 0] switch $arg2 {  PING {putlc "PONG [lindex $arg 1]"}  ERROR {   putserv "PRIVMSG $chanlinkchan :032ERROR: Closing Link"   linkchan:shutdown  } } switch [lindex $arg 1] {  001 {   putlc "MODE $chanlinknick :+i"   putlc "JOIN $chanlinkchan"  }  433 {   set chanlinknick $nick[rand 1000]   putdcc $idx "NICK :$chanlinknick"  }  353 {puthelp "privmsg $chanlinkchan :$chanlinknet NAMES list: [string trimleft [string trimleft [string trimleft $arg :] "abcdefghijklmnopqrstuvwxyzABCDEFGHIJGKLMNOPQRSTUVWXYZ1234567890 !@*.#~-_|[]{}`="] :]"}  JOIN {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has joined $chanlinkchan"}  KICK {linkchan:kick $idx $arg}  NICK {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet in now known as [string trimleft [lindex $arg 2] :]@$chanlinknet"}  PART {puthelp "privmsg $chanlinkchan :033*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) has left $chanlinkchan"}  PRIVMSG {linkchan:privmsg $idx $arg}  QUIT {puthelp "privmsg $chanlinkchan :032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}[/code1]032*** [lindex [split [lindex [split $arg2 !] 0] :] 1]@$chanlinknet ([lindex [split $arg2 !] 1]) Quit ([string trimleft [string trimleft [string trimleft $arg :] $linkchantrim] :])"} }}</code></pre></div>Hope this helps!<br><br>/madgabz<br><br>PS. Thx for reminding about the script-error i made .. Im DUH'ing myself pretty much right now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>&lt;font size=-1&gt;[ This Message was edited by: madgabz on 2001-10-10 08:20 ]&lt;/font&gt;<br><br>&lt;font size=-1&gt;[ This Message was edited by: madgabz on 2001-10-10 08:22 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Wed Oct 10, 2001 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-10T10:04:00-04:00</updated>

		<published>2001-10-10T10:04:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=444#p444</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=444#p444"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=444#p444"><![CDATA[
2 things.<br><br>The code you posted wouldn't work, as a TCL script is not the partyline, so commands that you would normaly type int he partyline do not work.<br><br>The .linkchan command calls a certain part of a script, it is that part's name that we need.<br><br>Where di you get this script, and I will look at it, and try to create a solution for you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 10, 2001 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T09:48:00-04:00</updated>

		<published>2001-10-10T09:48:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=443#p443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=443#p443"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=443#p443"><![CDATA[
OK, I'm a complete Nubi on TCL, as I cant seem to learn this properly, when the tcl/tk-plugin for browsers doesnt work!<br><br>OK, so far so good:<br><br>Your code, with my changes, would then be saved to scriptfile, and exec'ed from within my eggdrop.conf?<br><br>The code for RESTARTS should be like this then:<div class="codebox"><p>Code: </p><pre><code>proc chk:restart {} {  global uptime  if {[expr $uptime + 60] &gt; [unixtime]} {    .linkchan #clan-klyt ETG irc.enterthegame.com 6667    #ANOTHER command    #Yet another command  }}chk:restart</code></pre></div>Regarding the 'need' bind, can You explain this to me?<br>dont bother if u dont have the time! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":grin:" title="Very Happy"><br><br>BTW, I'm using WinDrop 1.6.6, would there be a prob with 'unixtime' or is that taken care of by CygWin, too????<br><br>/madgabz<br><br>&lt;font size=-1&gt;[ This Message was edited by: madgabz on 2001-10-10 07:50 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Wed Oct 10, 2001 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-10T09:33:00-04:00</updated>

		<published>2001-10-10T09:33:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=440#p440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=440#p440"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=440#p440"><![CDATA[
You can use multiple methods to do this.<br><br>You can use the need bind, to detect rehashes.<br><br>Restarts are a little more stricky to do. SOmthing like the following should work.<br><div class="codebox"><p>Code: </p><pre><code>proc chk:restart {} {  global uptime  if {[expr $uptime + 60] &gt; [unixtime]} {    [b]BOT WAS RESTARTED - put code here[/b]  }}chk:restart</code></pre></div>The above can also be used to detect a rehash.<br><br>You can use the need bind again to detect when the bot re-connects to the server.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 10, 2001 9:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T09:19:00-04:00</updated>

		<published>2001-10-10T09:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=439#p439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=439#p439"/>
		<title type="html"><![CDATA[Auto-exec a Command on startup/rehash?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=439#p439"><![CDATA[
 need to perform a command everytime the bot reconnects to the IRC network (after a netsplit), or when it restarts/rehashes! <br><br>My need right now is to link the same channel on to diff. networks with the .linkchan command! <br><br>It works allright as single command, but it doesnt re-initialize the linkchan on restarts/reconnects! <br><br>Any solllutions??? <br><br><br>_________________<br>Greetings from:<br><br>MadGabZ<br><br>mail:<a href="mailto:klyt_madgabz@hotmail.com">klyt_madgabz@hotmail.com</a><br>ICQ:#93134846<br><br>Member and coordinator of:<br>Q3A-InstaGib Clan [KLYT]<br>Web:<a href="http://hosted.dailyrush.dk/klyt/" class="postlink">http://hosted.dailyrush.dk/klyt/</a><br>IRC:#clan-klyt @ QuakeNet &amp; EnterTheGame<br><br>&lt;font size=-1&gt;[ This Message was edited by: madgabz on 2001-10-10 07:52 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Wed Oct 10, 2001 9:19 am</p><hr />
]]></content>
	</entry>
	</feed>
