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

	<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>2011-02-08T07:01:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-08T07:01:47-04:00</updated>

		<published>2011-02-08T07:01:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95979#p95979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95979#p95979"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95979#p95979"><![CDATA[
<strong class="text-strong">user</strong> had posted some interesting stuff in <a href="http://forum.egghelp.org/viewtopic.php?t=13113" class="postlink">"socket api - nonblocking tcp made easy"</a>, worth reading. You should open your own topic and refer to this topic to give it as an example.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 08, 2011 7:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[putyn]]></name></author>
		<updated>2011-02-07T18:44:59-04:00</updated>

		<published>2011-02-07T18:44:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95976#p95976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95976#p95976"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95976#p95976"><![CDATA[
hey i know that this is an old topic but i really hope someone could help me <br>what i want to do is similar to this send data from php to the eggdrop but after that i need eggdrop to send some data back  back to the php script <br><br>any idea would be appreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11541">putyn</a> — Mon Feb 07, 2011 6:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2009-05-28T19:45:18-04:00</updated>

		<published>2009-05-28T19:45:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88995#p88995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88995#p88995"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88995#p88995"><![CDATA[
Change the port.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu May 28, 2009 7:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TehSky]]></name></author>
		<updated>2009-05-28T13:48:10-04:00</updated>

		<published>2009-05-28T13:48:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88993#p88993</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88993#p88993"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88993#p88993"><![CDATA[
Yep, figures. Anyways, there is no listenb sitting anywhere and there is only one script. <br><br>Thanks for the help you gave I guess.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10688">TehSky</a> — Thu May 28, 2009 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-05-28T09:29:02-04:00</updated>

		<published>2009-05-28T09:29:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88985#p88985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88985#p88985"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88985#p88985"><![CDATA[
Then you did either not fully restart your eggdrop, or you are loading several of these scripts at once. If you do see that ident/EOF error, that means you've still got that "listen ¤Port script listenb" line lying around somewhere.<br><br>"Couldn't open socket: address already in use" means just that, there is already some process listening on that ip:port. As such, you cannot create a new server socket with that very same address. This again suggests you did not remove that old "listen-based" script.<br><br><span style="color:red">Considering the orientation of your php-script, I'm not sure how much further help can be given at this forum.</span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu May 28, 2009 9:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TehSky]]></name></author>
		<updated>2009-05-27T19:42:26-04:00</updated>

		<published>2009-05-27T19:42:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88977#p88977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88977#p88977"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88977#p88977"><![CDATA[
<blockquote class="uncited"><div>[18:39] couldn't open socket: address already in use<br>    while executing<br>"socket -server main -myaddr $host $port"<br>    invoked from within<br>"set serverSocket [socket -server main -myaddr $host $port]"<br>    (file "scripts/announce.tcl" line <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><br>    invoked from within<br>"source scripts/announce.tcl"<br>    (file "eggdrop.conf" line 1337)<br>[18:39] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)</div></blockquote>From the SSH when trying to load eggdrop with your script. Announce .tcl = The Script. @tomekk<br><blockquote class="uncited"><div>Did you remember to do a complete restart of your eggdrop, in order to remove the old code? A simple .rehash would not suffice in this case.</div></blockquote>Yes I did. But after using tomekk's changes to the php, I got a Lost Connection while resolving hostname.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10688">TehSky</a> — Wed May 27, 2009 7:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-05-27T17:29:51-04:00</updated>

		<published>2009-05-27T17:29:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88976#p88976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88976#p88976"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88976#p88976"><![CDATA[
Did you remember to do a complete restart of your eggdrop, in order to remove the old code? A simple .rehash would not suffice in this case.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed May 27, 2009 5:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-05-27T14:16:51-04:00</updated>

		<published>2009-05-27T14:16:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88972#p88972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88972#p88972"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88972#p88972"><![CDATA[
i have some script which i wrote for someone on another forum, this script is sending simple msgs to the eggdrop, you can fix it for yourself:<br><br>here is 'eggsend.php' (file name should be the same like in &lt;form&gt; action and in header()):<div class="codebox"><p>Code: </p><pre><code>&lt;?php//eggdrop host port        $egg_port = 1234;//eggdrop host ip        $egg_ip = '10.0.1.10';        if (isset($_POST['message'])) {                $msg = $_POST['message'];                $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);                socket_connect($sock, $egg_ip, $egg_port) or die ('can\'t connect!');                socket_write($sock, $msg);                socket_close($sock);                header("Location: ./eggsend.php");        }        echo "&lt;form action='eggsend.php' method='POST'&gt;";                echo "&lt;input type='text' name='message' cols='20'&gt;&lt;br&gt;";                echo "&lt;input type='submit' value='send'&gt;";        echo "&lt;/form&gt;";?&gt;~</code></pre></div>here is script for eggdrop:<div class="codebox"><p>Code: </p><pre><code>set output_chan "#channel"# eggdrop port to bindset port 1234# eggdrop ip to bindset host 10.0.1.10set serverSocket [socket -server main -myaddr $host $port]proc main { sock host port } {        fconfigure $sock -buffering line        fileevent $sock readable [action $sock $host $port]}proc action { chan host port } {        global output_chan        if {![eof $chan]} {                set soc_data [gets $chan]                if {$soc_data != ""} {                        putquick "PRIVMSG $output_chan :$host | $port | $soc_data"                }        } {                close $chan        }}putlog "sock-server.tcl"</code></pre></div>i sent: "lala" through page<br><br>bot on chan:<blockquote class="uncited"><div>19:54:54 &lt; botty&gt; lala</div></blockquote>about your problem, maybe bot is getting timeout cause your php script is holding connection to long?<br><br>in those scripts, you are sending information just once, i mean : connect -&gt; send one line -&gt; disconnect, there is no holding of connection<br><br>don't know how many data your php script is sending at one time, maybe fix it or something and make it like this "send" script, connect -&gt; announce -&gt; disconnect, and after another connect -&gt; announce -&gt; disconnect<br><br>/edit/<br><br>just try to load my tcl script to your eggdrop, set up proper ip and port and after change in your php script:<br><div class="codebox"><p>Code: </p><pre><code>$ANS = fsockopen('64.85.160.159', 51010);fputs($ANS, $Announce);sleep(8);fclose($ANS);</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);socket_connect($sock, '64.85.160.159', 51010) or die ('can\'t connect!');socket_write($sock, $msg);socket_close($sock);</code></pre></div>and check it, use this php script in proper way <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>bot should write announce to the chan,<br>for tests, you can try to use short message: socket_write($sock, "test me");<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed May 27, 2009 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TehSky]]></name></author>
		<updated>2009-05-27T13:09:38-04:00</updated>

		<published>2009-05-27T13:09:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88971#p88971</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88971#p88971"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88971#p88971"><![CDATA[
Thank you very much for your help everyone. Unfortunately I am still getting an EOF error with nml375's script. But more was added. <br><blockquote class="uncited"><div>Telnet connection: unknown.mywebsite.com/37874<br>Timeout/EOF ident connection<br>Lost telnet connection to <a href="mailto:telnet@unknown.mywebsite.com">telnet@unknown.mywebsite.com</a>/37874</div></blockquote>This is what I have on the webserver sending the information. <br><div class="codebox"><p>Code: </p><pre><code>#$ANS = fsockopen('64.85.160.159', 51010);#fputs($ANS, $Announce);#sleep(8);#fclose($ANS);</code></pre></div> <br>Long Version: <a href="http://txt.srinsr.in/index.php/view/34356603" class="postlink">http://txt.srinsr.in/index.php/view/34356603</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10688">TehSky</a> — Wed May 27, 2009 1:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-05-27T09:37:11-04:00</updated>

		<published>2009-05-27T09:37:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88965#p88965</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88965#p88965"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88965#p88965"><![CDATA[
Thanks, I wasn't picking that up from the original post.<br><br>I did end up using native Tcl sockets. The whole connect/control mechanism seemed sort of 'unfinished' and the documentation erroneous.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Wed May 27, 2009 9:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-05-27T09:27:56-04:00</updated>

		<published>2009-05-27T09:27:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88964#p88964</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88964#p88964"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88964#p88964"><![CDATA[
arfer, the big difference here, is that we are dealing with server sockets versus listen, not client sockets vs connect. Your case is rather different, as you are required to use listen as you wish the connection to gain access to the dcc partyline, which this case does not require. Hence, the use of server sockets should get rid of those log notices...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed May 27, 2009 9:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-05-27T09:24:02-04:00</updated>

		<published>2009-05-27T09:24:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88963#p88963</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88963#p88963"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88963#p88963"><![CDATA[
I have posted a similar thread not too long ago, similarly discussing the EOF/Timeout party line event with nml375.<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=16877" class="postlink">http://forum.egghelp.org/viewtopic.php?t=16877</a><br><br>It does seem likely that the event is caused by failure to respond to an identd request made by the destination bot. I can tell you that the event occurs irrespective of whether you use connect/control or native Tcl sockets (assuming there is no identd daemon to respond). At worst, it simply causes a finite but small delay in connecting.<br><br>You can see a screenshot of my script in if you look at the URL I just pasted, it seems to be functioning well. If you are interested, pm me and I will give you an address where you can download it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Wed May 27, 2009 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-05-27T03:49:33-04:00</updated>

		<published>2009-05-27T03:49:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88959#p88959</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88959#p88959"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88959#p88959"><![CDATA[
Your web-server doesn't run an identd service, and thus your eggdrop will make a note of that.<br><br>To avoid this, you could try using tcl server sockets instead. Using this socket interface is a little more cumbersome though. I believe something like this should do the trick:<div class="codebox"><p>Code: </p><pre><code>set servsock [socket -server handleConnect 51010]proc handleConnect {socket clientIP clientPort} {  fconfigure $socket -blocking 0  fileevent $socket readable [readSocket $socket]}proc readSocket {socket} {  while {[gets $socket line] &gt;= 0} {    puthelp "PRIVMSG $::Chan :$line"  }  if {[eof $socket]} {    close $socket  }}</code></pre></div>Finally, a hint for future coding, stay away from the variable name "args", and you won't have to do all this string&lt;-&gt;list juggling you are doing. Eggdrop bindings always call the associated command with a fixed number of arguments for each kind of binding, so you don't need to accept arbitrary number of arguments.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed May 27, 2009 3:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TehSky]]></name></author>
		<updated>2009-05-27T02:05:12-04:00</updated>

		<published>2009-05-27T02:05:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88958#p88958</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88958#p88958"/>
		<title type="html"><![CDATA[Announce Bot w/ Telnet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88958#p88958"><![CDATA[
I'm trying to have create an announcebot that gets information through a telnet connection. Using this script. <br><div class="codebox"><p>Code: </p><pre><code>set Port "51010"set Chan "#channel"listen $Port script listenbproc listenb {idx} {control $idx listenb1}proc listenb1 {idx args} {set args [join $args]set Announce [join [lrange [split $args] 0 end]]putquick "PRIVMSG $::Chan :$Announce"}putlog "Announce Loaded"</code></pre></div>My problem is I get this in the DCC chat with my Eggdrop.<br><blockquote class="uncited"><div>Telnet connection: mywebsite.com/43942<br>Timeout/EOF ident connection</div></blockquote>I tried .+host *!*@* and it didnt work, any ideas?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10688">TehSky</a> — Wed May 27, 2009 2:05 am</p><hr />
]]></content>
	</entry>
	</feed>
