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

	<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-12-09T14:44:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Jag]]></name></author>
		<updated>2003-12-09T14:44:38-04:00</updated>

		<published>2003-12-09T14:44:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31242#p31242</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31242#p31242"/>
		<title type="html"><![CDATA[Sockets question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31242#p31242"><![CDATA[
10x <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3871">Jag</a> — Tue Dec 09, 2003 2:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-05T20:08:41-04:00</updated>

		<published>2003-12-05T20:08:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31120#p31120</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31120#p31120"/>
		<title type="html"><![CDATA[Re: Sockets question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31120#p31120"><![CDATA[
<blockquote class="uncited"><div>This script is working very well when it's a proxy/socks.<br>but, if it's not a proxy/socks, the eggdrop get into a big lag for a few minutes, and don't send me the message "No".<br>Somebody knows why? :\</div></blockquote>This is because tcl is waiting for the tcp layer in your os to let the connection time out. The reason it takes so long is probably because the host you're trying to connect to is dropping your syn packet, so you don't get an explicit "connection refused" even though the port is not open. (or the host might be dead)<br><br>Try using <a href="http://tcl.tk/man/tcl8.3/TclCmd/socket.htm#M8" class="postlink">-async</a> when creating the socket. Then 'socket' will return immediately and you'll be able to set up a callback using '<a href="http://tcl.tk/man/tcl8.3/TclCmd/fileevent.htm" class="postlink">fileevent</a>' (writable) to have a second proc called when the connection succeeds/fails. This won't speed up the timeout, but allow your bot to do other things while waiting.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Dec 05, 2003 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-12-05T19:14:51-04:00</updated>

		<published>2003-12-05T19:14:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31119#p31119</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31119#p31119"/>
		<title type="html"><![CDATA[Sockets question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31119#p31119"><![CDATA[
I'm not sure, but try to use "else" and close $sport before sending no.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Dec 05, 2003 7:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jag]]></name></author>
		<updated>2003-12-05T15:36:44-04:00</updated>

		<published>2003-12-05T15:36:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31116#p31116</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31116#p31116"/>
		<title type="html"><![CDATA[Sockets question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31116#p31116"><![CDATA[
Hi,<br>I have a little question about this script:<div class="codebox"><p>Code: </p><pre><code>proc socks_monitor {nick ip} {  global hst prt sport  set hst "$ip"  set prt "1080"  catch {socket $hst $prt} sport  if {([string range $sport 0 3] == "sock") &amp;&amp; ([lindex $sport 1] == "")} {    close $sport    putserv "privmsg Jag Yes"    return 0  }  putserv "privmsg Jag No"  close $sport  return 0}</code></pre></div>This script is working very well when it's a proxy/socks.<br>but, if it's not a proxy/socks, the eggdrop get into a big lag for a few minutes, and don't send me the message "No".<br>Somebody knows why? :\<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3871">Jag</a> — Fri Dec 05, 2003 3:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
