Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Wait for port/time, can you tell which is which?

From: ptretter:charter at: 16-Jun-2001 13:23

Hi Mat, not sure I understand you problem is totally, but since I once created an IRC bot I thought I would take a stab at it. As for knowing whether a port is closed you should receive a "none" from the client on the other end or server if it closes a connection. The problem you run into alot of times is when the client doesnt close the port and you remain opened listening for data as you have not received the string "none". Make sure you understand that you will receive a string and not the literal 'none you might be used to. It is therefore crucial that you create a portion of your script to verify the connection is indeed alive or have it just timeout if the connection is idle (which is what I prefer). I actually created an IRC bot script that would connect or cycle thru a list of IRC servers and connect. It worked very well and if got disconnected it would immediately begin the perpetual cycle of reconnecting thru the list and starting at next server. The script I made works well and is quite large but if I dig it up I will try to send it to you as it also support DCC protocol and CTCP protocol. It was my attempt to create a gateway between Instant messaging and the IRC networks which I may finish someday. Paul Tretter