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

	<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>2008-01-31T17:24:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sparc317]]></name></author>
		<updated>2008-01-31T17:24:12-04:00</updated>

		<published>2008-01-31T17:24:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80521#p80521</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80521#p80521"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80521#p80521"><![CDATA[
Heh Metroid,<br><br>Its not when the bot disconnects which I'm looking to handle, its when the TCP connection my script monitors disconnects. <br><br>Seems to be working how I want though, thank god these forums exist so many helpful people on here <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=9653">sparc317</a> — Thu Jan 31, 2008 5:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2008-01-31T13:01:28-04:00</updated>

		<published>2008-01-31T13:01:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80516#p80516</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80516#p80516"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80516#p80516"><![CDATA[
<blockquote class="uncited"><div>Hey,<br><br>Cheers for the replies.<br><br>Sorry I was being a bit dumb (long day) its a script I wrote so load/unload mod will be pointless.<br><br>I've achieved what I need now using the following though:<br><div class="codebox"><p>Code: </p><pre><code>"onDisc" {      sleep 120     exec "/bin/kill -HUP `cat /usr/home/xxx/eggdrop/pid.xxxx`"}</code></pre></div>Noticed that sending the eggdrop SIGHUP causes it to stay connected to the network and in the channel but rehash and reload its TCL scripts.</div></blockquote>I'm guessing that your script executes something the moment it is loaded.<br>Why don't you just place that code in a proc and simply execute that proc on startup and execute it again when the bot is disconnected?<br><br>You seem to be to be overdoing it.<br>"The best solution is often the most simple one"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Thu Jan 31, 2008 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-01-30T18:39:19-04:00</updated>

		<published>2008-01-30T18:39:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80483#p80483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80483#p80483"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80483#p80483"><![CDATA[
Could just use the rehash tcl command then, has the exact same behaviour.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jan 30, 2008 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparc317]]></name></author>
		<updated>2008-01-30T16:18:02-04:00</updated>

		<published>2008-01-30T16:18:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80480#p80480</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80480#p80480"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80480#p80480"><![CDATA[
Hey,<br><br>Cheers for the replies.<br><br>Sorry I was being a bit dumb (long day) its a script I wrote so load/unload mod will be pointless.<br><br>I've achieved what I need now using the following though:<br><div class="codebox"><p>Code: </p><pre><code>"onDisc" {      sleep 120     exec "/bin/kill -HUP `cat /usr/home/xxx/eggdrop/pid.xxxx`"}</code></pre></div>Noticed that sending the eggdrop SIGHUP causes it to stay connected to the network and in the channel but rehash and reload its TCL scripts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9653">sparc317</a> — Wed Jan 30, 2008 4:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-01-30T13:53:36-04:00</updated>

		<published>2008-01-30T13:53:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80472#p80472</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80472#p80472"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80472#p80472"><![CDATA[
if the unloadmod and loadmod commands are placed within a proc, there should be no problem using that code. Keep in mind however, that these commands only work with modules, not scripts.<br><br>Also, if the proc is created and registered by the module, care would have to be made not to unregister it upon unloading the module.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jan 30, 2008 1:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2008-01-30T13:49:02-04:00</updated>

		<published>2008-01-30T13:49:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80471#p80471</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80471#p80471"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80471#p80471"><![CDATA[
Is it a mod or a script?<br>Your information seems to be conflicting.<br><br>Furthermore, we can't help you if you don't post the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jan 30, 2008 1:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparc317]]></name></author>
		<updated>2008-01-30T05:48:20-04:00</updated>

		<published>2008-01-30T05:48:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80458#p80458</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80458#p80458"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80458#p80458"><![CDATA[
I am the writer of the script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>My question is how to get just the script to reinitialize itself.<br><br>I have rejigged my script to do the following when the connection drops:<br><div class="codebox"><p>Code: </p><pre><code>sleep 120restart</code></pre></div>This is fine but it causes the entire eggdrop to reload (bot leaves and rejoins channel etc.)<br><br>I might try this instead:<br><div class="codebox"><p>Code: </p><pre><code>sleep 120unloadmodule nameofmymodloadmodule nameofmymod</code></pre></div>Haven't tried the above yet but I guessed it wouldn't hit the loadmodule as it unloads itself.<br><br>Was wondering really if there was a command to "reload current module" as doesn't seem to be anything like this in tcl-commands.doc<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9653">sparc317</a> — Wed Jan 30, 2008 5:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2008-01-30T04:44:59-04:00</updated>

		<published>2008-01-30T04:44:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80457#p80457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80457#p80457"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80457#p80457"><![CDATA[
You should have made the effort to look into that "partyline" stuff. You can do great things with it.<br>Best solution would however be to contact the writer of the script to reinitialize itself using a timer after the connection dropped. If you are unable to do that, you might want to search for "loadtcl" on these forums.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Jan 30, 2008 4:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparc317]]></name></author>
		<updated>2008-01-29T09:27:13-04:00</updated>

		<published>2008-01-29T09:27:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80429#p80429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80429#p80429"/>
		<title type="html"><![CDATA[How to get a script to reload itself in eggdrop?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80429#p80429"><![CDATA[
Hiya,<br><br>I have a script that monitors a TCP connection and dumps it to a channel, all working great.<br><br>However I would like to have a handler so that when the connection drops, it sleeps for a minute and then reloads the TCL script.<br><br>Is there a way to do this, as at present I just call a shell script that restarts the bot but it would be much nicer if I can just reload the specific script that is running.<br><br>Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9653">sparc317</a> — Tue Jan 29, 2008 9:27 am</p><hr />
]]></content>
	</entry>
	</feed>
