Perhaps the following (keeping as close to your code as possible) will
help... it's very basic but at least you see responses from the IRC server,
on the basis of which you'll be able to add more to do what you desire.

REBOL[]

size: 10000
b: make string! size

irc-port: [
        scheme: 'tcp
        host: "us.dal.net"
        port-id: 7000
]

port: open irc-port

insert port "NICK tret^/"
insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/"
insert port "JOIN #REBOLGODS^/"
insert port "WHOIS tret^/"

forever  [
  if 0 < length? b [print b clear b]    ; display replies and clear buffer
  read-io port b size           ; get next replies from server
]

; use ESC to stop program and then manually enter "close port"
; or just wait for port to time out and close itself on error


Russ

----
At 09:46 AM 9/8/2000 -0500, you wrote:
>I cant figure it out - doc after doc port after port - its killin me.
>
>How do you join an irc channel?  I did the open port stuff I can do it with
>telnet but not with REBOL.  Look at my script below and tell me whats wrong.
>I understand I havent accounted for everything that IRC RFC states but
>should I think have enough to contact the server and join the channel but
>doesnt work.
>
>Any ideas?
>
>Paul Tretter
>
>------------------------------------------
>
>
>REBOL[]
>
>irc-port: open/direct/string/no-wait [
>       scheme: 'tcp
>       host: "irc.mindspring.com"
>       port-id: 6667
>]
>while [data: copy irc-port] [prin data]
>insert irc-port "NICK tret^/"
>close irc-port
>irc-port: open/direct/string/no-wait [
>       scheme: 'tcp
>       host: "irc.mindspring.com"
>       port-id: 6667
>]
>
>insert irc-port "USER tret rebol.dyndns.org irc.mindspring.com tret^/"
>close irc-port
>irc-port: open/direct/string/no-wait [
>       scheme: 'tcp
>       host: "irc.mindspring.com"
>       port-id: 6667
>]
>
>insert irc-port reform "JOIN #REBOLGODS^/"
>close irc-port
>
>
>
>

Reply via email to