16-02-2007, 09:50 AM
Im having some problems with my IRC bot, i need it to every time someone says PING it will say PONG back
Thats what i have at the moment. Thats the three ways i have tried.
If anyone can help, that would be awesome
Code:
Private Sub winsock1_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim data As String
Winsock1.GetData data
txtmain.Text = data & vbCrLf & txtmain.Text
If InStr(data, "PING") = 1 Then
Winsock1.SendData "PONG " & Split(data, " ")(1)
End If
If txtmain.Text = "ping" Then
Winsock1.SendData "PRIVMSG #fragfm : pong" & vbCrLf
End If
If InStr(data, "PING") = 1 Then
Winsock.SendData "PRIVMSG #fragfm : Hi, this is my message" & vbCrLf
End If
End Sub
Thats what i have at the moment. Thats the three ways i have tried.
If anyone can help, that would be awesome
