Hallo allemaal,
Ik heb een IRC client geprogrammeerd in VB.NET maar hij heeft problemen als hij op een iRC server komt die op een Ident response wacht.
Nou heb ik wat code die in VB6 prima schijnt te werken, maar ik heb geen idee hoe ik hem om moet zetten naar de System.Net.Sockets... Iemand wel..?
Private Sub Form_Load()
On Error Resume Next
Winsock1.localport = 113
Winsock1.listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
On Error Resume Next
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim IdentD1 As String
Winsock1.GetData IdentD1, vbString
IdentD1 = Replace(IdentD1, vbCr, "")
IdentD1 = Replace(IdentD1, vbLf, "")
Winsock1.SendData (IdentD1 & " : USERID : UNIX : " & "Identd name here") & vbCrLf
End Sub
Private Sub Winsock1_Close()
Winsock1.Close
Winsock1.LocalPort = 113
Winsock1.Listen
End Sub
Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock1.Close
Winsock1.LocalPort = 113
Winsock1.Listen
End Sub
Ik heb een IRC client geprogrammeerd in VB.NET maar hij heeft problemen als hij op een iRC server komt die op een Ident response wacht.
Nou heb ik wat code die in VB6 prima schijnt te werken, maar ik heb geen idee hoe ik hem om moet zetten naar de System.Net.Sockets... Iemand wel..?
Private Sub Form_Load()
On Error Resume Next
Winsock1.localport = 113
Winsock1.listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
On Error Resume Next
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim IdentD1 As String
Winsock1.GetData IdentD1, vbString
IdentD1 = Replace(IdentD1, vbCr, "")
IdentD1 = Replace(IdentD1, vbLf, "")
Winsock1.SendData (IdentD1 & " : USERID : UNIX : " & "Identd name here") & vbCrLf
End Sub
Private Sub Winsock1_Close()
Winsock1.Close
Winsock1.LocalPort = 113
Winsock1.Listen
End Sub
Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock1.Close
Winsock1.LocalPort = 113
Winsock1.Listen
End Sub