by nikos_ft (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 3rd May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Connect to an irc server using winsock
winsock1.remoteport=6667 /*usually this is th port */
winsock1.connect
/*add the following code to the private sub Winsock1_Connect()*/
winsock1.senddata ("NICK yournicknamehere" & vbcrlf)
winsock1.senddata ("USER yourusernamehere yourproviderhere_ winsock1.remoteserver :Yournamehere Yoursurname here" &vbcrlf )
/* suppose your email is [email protected] your user name = nick and your provider = provider.*/
/*here is the code to response to a ping so you will remain connected added to the private sub winsock1_dataarrival*/
dim redata as string
Winsock1.GetData redata
If Left$(redata, 4) = "PING" Then
Winsock1.SendData ("PING " & Right$(redata, (Len(redata) - 5)))