This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Got another question concerning a socket connection w/tcl

Old posts that have not been replied to for several years.
Locked
D
Darok

Got another question concerning a socket connection w/tcl

Post by Darok »

I'm getting this error: (using eggdrop1.6.13 and unreal3.1.14)
[21:20] WARNING: open_telnet_raw() is about to block in gethostbyname()!
[21:20] <<Darok>> !*! .startservice
[21:20] net: connect! sock 7
[21:21] net: eof!(read) socket 7

(from ./eggdrop -n via ssh)

This is a copy of the code I used. (remember I'm new)

#new connection
bind pub -|* .startservice pubm:serv
proc pubm:serv {nick host handle chan text} {
set idx [connect my.server.org 7029]
}
proc test:connect idx {
puthelp "PRIVMSG #Construct :Connnection successful"
}


Any help/suggestions would be greatly appreciated
Last edited by Darok on Wed Jan 15, 2003 1:09 pm, edited 1 time in total.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This caused by the fact you provide no fucntion with which to handle the socket just opened.

You have used the "connect" command to open a connect, then you simply existed the function, leaving it with nothing to do but sit thetre and die.

I am guessing the rest of the code should say it was a sucess. This will never be called, as it's not been told to.

See the meaning of the "contro;" command in tcl-commands.doc
D
Darok

Post by Darok »

procname <idx> <input-text>

So if I'm reading this right, <input-text> needs to be a something to trigger the proc. and carry out specific operations (ie putserv ect...) Could someone layout the syntax for such a script, using the control feature?
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Darok wrote:procname <idx> <input-text>

So if I'm reading this right, <input-text> needs to be a something to trigger the proc. and carry out specific operations (ie putserv ect...) Could someone layout the syntax for such a script, using the control feature?
Hi Darok, at first "connect", "listen" and "control" and the return values seem a bit confusing, bit if you play around a bit, it will become clear.

Below you'll find an example.

http://members.fortunecity.com/eggheadt ... ct.tcl.txt
D
Darok

Post by Darok »

Thx for the feedback. I'll take a look at your link and see if I can figure it out. Thanks 8)
D
Darok

Post by Darok »

Thx for the help egghead. I successfully got my eggdrop to open a services connection to my IRCD. The only thing I have to learn now is string manipulation, and a little more about variables. So I can send ping replies and responses based on certian text events like user connections to the ircd, nick changes, ect... Thx again to everyone for their help.
D
Darok

Post by Darok »

My script is getting there, slowly but surely. So I have the connection open, how would I send ping replies? I've tried a few different variations, none seem to be working properly. How would I send a PING reply to a server?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Server pings, are replied using pongs.

Simply use "PONG <args>". <args> are obtained from the incominf PING command.

Not all servers send arguments, and only send the PING
Locked