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

	<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>2006-12-24T22:31:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-12-24T22:31:42-04:00</updated>

		<published>2006-12-24T22:31:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69225#p69225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69225#p69225"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69225#p69225"><![CDATA[
Also advisable to use [catch] to prevent crashes like that..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Dec 24, 2006 10:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KrzychuG]]></name></author>
		<updated>2006-12-24T07:07:43-04:00</updated>

		<published>2006-12-24T07:07:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69217#p69217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69217#p69217"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69217#p69217"><![CDATA[
<blockquote class="uncited"><div>Hmm.. although I dont fully understand what it does, it seems to work :) Thanks for your help!!!</div></blockquote>It's quite simple. At the beggining you were trying to open socket every time when bot was started/restarted/rehashed. As you know you cannot bind same port to the same IP many times without closing previous connection. <br><br>You could bind a procedure to prerehash event and close your socket, then open it again after rehash or save socket name somewhere (in that case in ::socket variable) and not to open it again after rehash what was suggessted by metroid.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3672">KrzychuG</a> — Sun Dec 24, 2006 7:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Tristam]]></name></author>
		<updated>2006-12-23T21:55:43-04:00</updated>

		<published>2006-12-23T21:55:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69206#p69206</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69206#p69206"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69206#p69206"><![CDATA[
Hmm.. although I dont fully understand what it does, it seems to work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Thanks for your help!!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3881">Tristam</a> — Sat Dec 23, 2006 9:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-12-23T21:20:29-04:00</updated>

		<published>2006-12-23T21:20:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69205#p69205</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69205#p69205"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69205#p69205"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {![info exists ::socket]} {  set ::socket [socket -server Server 1234]}proc Server {channel clientaddr clientport} {  gets $channel msg_bt  putserv "PRIVMSG #lennonjohto :$msg_bt"putserv "ADDLINE :$msg_bt"  close $channel  set ::socket [socket -server Server 1234]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat Dec 23, 2006 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Tristam]]></name></author>
		<updated>2006-12-23T20:04:50-04:00</updated>

		<published>2006-12-23T20:04:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69203#p69203</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69203#p69203"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69203#p69203"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>couldn't open socket: address already in use</div></blockquote>It had told you the problem; a socket left open.</div></blockquote>yeah, I figured that out.. but I'm having a hard time figuring out how to close the socket <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Could someone help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3881">Tristam</a> — Sat Dec 23, 2006 8:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-12-23T18:39:54-04:00</updated>

		<published>2006-12-23T18:39:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69202#p69202</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69202#p69202"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69202#p69202"><![CDATA[
<blockquote class="uncited"><div>couldn't open socket: address already in use</div></blockquote>It had told you the problem; a socket left open.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sat Dec 23, 2006 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Tristam]]></name></author>
		<updated>2006-12-23T21:56:55-04:00</updated>

		<published>2006-12-23T15:47:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69201#p69201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69201#p69201"/>
		<title type="html"><![CDATA[Problems rehashing while using sockets. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69201#p69201"><![CDATA[
Hello! I'm using a tcl script to exchange data between a php-website and my eggdrop.. it works fine, here's the script:<br><div class="codebox"><p>Code: </p><pre><code>PHP&lt;?php$msg_bt = "some text to be sent to eggdrop";$fs = fsockopen("127.0.0.1", "1234", $errno, $errstr);if($fs) {      fwrite($fs, $msg_bt);      fclose($fs);}?&gt;</code></pre></div><div class="codebox"><p>Code: </p><pre><code>TCLproc Server {channel clientaddr clientport} {  gets $channel msg_bt  putserv "PRIVMSG #lennonjohto :$msg_bt"putserv "ADDLINE :$msg_bt"  close $channel  socket -server Server 1234}socket -server Server 1234</code></pre></div>so.. this works just fine and I'm happy with it.. it's going to be part of a bigger system, not to be used like this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Anyway, this works but everytime I try to rehash the bot it crashes<br><blockquote class="uncited"><div>Tcl error in file botti.conf<br>couldn't open socket: address already in use<br>     while executing<br>"socket -server Server 1234"</div></blockquote>and the bot quits.. I got the script from somewhere and I really dont know how to use sockets.. all I know it works, but crashes when I rehash.. How to change the script/what's wrong with it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3881">Tristam</a> — Sat Dec 23, 2006 3:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
