i made this code, and i dont know if it works, and i cant test it right now, will you take a look and tell me what i need to change, add
thanks
Code:Private Sub Client_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim Buffer As String Dim I As Long Call Client(Index).GetData(Buffer, vbString, byestotal) Let Client(Index).Tag = Client(Index).Tag & Buffer Let I = InStr(1, Client(Index).Tag, sckSep) If I < 2 Or I > 3 Then Dim Ban As CBan: Set Ban = New CBan Let Ban.By = "Server" Let Ban.IP = Client(Index).RemoteHostIP Let Ban.Reason = "sckSep position < 2 or > 3" Let Ban.Time = CDate(Date$ & " " & Time$) Call DB.Bans.Add(Ban, Ban.IP) Call Client_Close(Index) Exit Sub End If Let I = InStr(1, Client(Index).Tag, sckEnd) While I Let Buffer = Mid$(Client(Index).Tag, 1, I) Let Client(Index).Tag = Right$(Client(Index).Tag, I + 1) If Len(Buffer) Then Call ProcessData(Index) End If Let I = InStr(1, Client(Index).Tag, sckEnd) Wend End Sub




Reply With Quote