Hi!
I recently saw a thread about connecting to IRC (already buried), and since I also wanted to connect to IRC using winsock, I thought to reopen it here since it never got resolved (not on my end).
// Connect to IRC
ServerIP$ = "63.243.153.247"
ServerPort = 6667
channel as DWORD
nick$ = "TestBot"
user$ = "TestBot"
name$ = "TestBot"
winsock make
if (winsock error())
print winsock error msg$()
wait key
end
endif
channel = winsock connect(ServerIP$, ServerPort)
check_for_error(channel)
winsock send string channel,"NICK"+nick$+chr$(13)+chr$(10)
winsock send string channel,"USER"+user$+chr$(13)+chr$(10)
winsock send string channel,"Join #somechannel"+chr$(13)+chr$(10)
Do
print "looping"
nice wait 1000
Loop
function check_for_error(a_channel as DWORD)
if (winsock channel error(a_channel))
cls
print winsock channel error msg$(a_channel)
wait key
winsock clean up
end
endif
endfunction
Running netstat reveals that it is connecting, but the it never shows up in my channel (somechannel).
Any thoughts?
Thanks!
PS: Old thread:
http://forum.thegamecreators.com/?m=forum_view&t=133934&b=1
You're the

'th to view this signature!