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

	<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-07-09T15:26:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-07-09T15:26:34-04:00</updated>

		<published>2008-07-09T15:26:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83924#p83924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83924#p83924"/>
		<title type="html"><![CDATA[Making a socket TCL script work with eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83924#p83924"><![CDATA[
good idea about this script.. if you fix it plz release it.. if you want.. will be great <br><br>thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Wed Jul 09, 2008 3:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-01-24T10:29:54-04:00</updated>

		<published>2008-01-24T10:29:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80310#p80310</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80310#p80310"/>
		<title type="html"><![CDATA[Making a socket TCL script work with eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80310#p80310"><![CDATA[
You really don't need vwait, or rather, should not use vwait in eggdrop, as this will block eggdrop's own event-engine (different than tcl's engine). Also, eggdrop calls the Tcl_DoOneEvent within the main-loop stepping tcl's event-engine.<br>Drop the vwait, and your script should work pretty ok.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jan 24, 2008 10:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-01-23T17:24:14-04:00</updated>

		<published>2008-01-23T17:24:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80301#p80301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80301#p80301"/>
		<title type="html"><![CDATA[Making a socket TCL script work with eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80301#p80301"><![CDATA[
I've never seen or figured out how vwait is supposed to be used. But in your case, you'd probably be better off using a 'while' loop, while not EOF, gets $gsSock, something along those lines.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Jan 23, 2008 5:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparc317]]></name></author>
		<updated>2008-01-23T09:40:45-04:00</updated>

		<published>2008-01-23T09:40:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80290#p80290</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80290#p80290"/>
		<title type="html"><![CDATA[Making a socket TCL script work with eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80290#p80290"><![CDATA[
Hi All,<br><br>I would be very grateful if someone could point me in the right direction with something I'm a bit stuck on.<br><br>I'll admit I'm a beginner TCL programmer, but have coded in various other languages before.<br><br>Basically I have a TCL script that works fine if I run it outside of Eggdrop, however when loading it in Eggdrop I'm hitting some issues.<br><br>What my script does is connect to a TCP port on a gameserver, login and monitor chat taking place on the server. It then simply prints any chat messages it finds.<br><br>I believe the problem to be because I'm using "vwait eventLoop". This causes the bot to hang while loading, and I'm a bit unsure of how I should rewrite this to be eggrop friendly.<br><br>My script is below and I would be very grateful for any help I can get in getting this to work with eggdrop.<br><br>Thanks!!<br><div class="codebox"><p>Code: </p><pre><code># Set server connection detailsset gsname "xxxx"set gsip "xxxx"set gsadmport xxxxset gspass "xxxx"set gsnick "xxx"# Handle output from the server and print chat messages to channelproc read_sock {sock} {  set l [gets $sock]   if {[string match *Chat* $l]} {    puthelp "PRIVMSG #gsadmins :Server #02 - $l"   }}# Setup the connectionset gsSock [socket $gsip $gsadmport]# Monitor the socketfileevent $gsSock readable [list read_sock $gsSock]# Line buffer the socketfconfigure $gsSock -buffering line# Send admin passwordputs $gsSock "$gspass"# Identify us!puts $gsSock "/nick $gsnick"# Wait and handle eventsvwait eventLoop</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9653">sparc317</a> — Wed Jan 23, 2008 9:40 am</p><hr />
]]></content>
	</entry>
	</feed>
