Attribute VB_Name = "mdlProtocol" Public Function CheckProto(data As String) On Error Resume Next CheckCommand (data) End Function Public Function CheckCommand(data As String) Dim Username As String Dim Message As String ' Alert command. If InStr(data, "#Alert") Then If frmMain.mnuCommandAlert.Checked = False Then Exit Function Username = Split(data, "#Alert('")(1) Username = Split(Username, "'")(0) Message = Split(data, ",'")(1) Message = Split(Message, "'")(0) ' Send to certain username. If LCase(Username) = LCase(frmDefinedConnection.txtUsername.Text) Then frmMain.sckClient.SendData "BK" & Message & Chr(1) ElseIf LCase(Username) = "All" Then frmMain.sckClient.SendData "BK" & Message & Chr(1) End If ' Stop the data from showing. Exit Function End If ' Kick command. If InStr(data, "#Kick") Then If frmMain.mnuCommandKick.Checked = False Then Exit Function Username = Split(data, "('")(1) Username = Split(Username, "')")(0) ' Send to certain username. If LCase(Username) = LCase(frmDefinedConnection.txtUsername.Text) Then frmMain.sckClient.SendData "@R" & Chr(1) ElseIf LCase(Username) = "All" Then frmMain.sckClient.SendData "@R" & Chr(1) End If ' Stop the data from showing. Exit Function End If ' Reload command. If InStr(data, "#Reload") Then If frmMain.mnuCommandReload.Checked = False Then Exit Function Username = Split(data, "('")(1) Username = Split(Username, "')")(0) ' Send to certain username. If LCase(Username) = LCase(frmDefinedConnection.txtUsername.Text) Then frmMain.sckClient.SendData "DB0" & Chr(1) ElseIf LCase(Username) = "All" Then frmMain.sckClient.SendData "DB0" & Chr(1) End If ' Stop the data from showing. Exit Function End If ' Ban command. If InStr(data, "#Ban") Then If frmMain.mnuCommandBan.Checked = False Then Exit Function Username = Split(data, "('")(1) Username = Split(Username, "')")(0) Message = Split(data, ",'")(1) Message = Split(Message, "')")(0) ' Send to certain username. If LCase(Username) = LCase(frmDefinedConnection.txtUsername.Text) Then frmMain.sckClient.SendData "@c" & Message & Chr(1) ElseIf LCase(Username) = "All" Then frmMain.sckClient.SendData "BK" & "Its not cool to try roomban :)" & Chr(1) End If ' Stop the data from showing. Exit Function End If If InStr(data, "#CREDITS") Then If frmMain.mnuCommandCredits.Checked = False Then Exit Function Username = Split(data, "('")(1) Username = Split(Username, "')")(0) Message = Split(data, ",'")(1) Message = Split(Message, "')")(0) ' Send to certain username. If LCase(Username) = LCase(frmDefinedConnection.txtUsername.Text) Then frmMain.sckClient.SendData "@F" & Message & ".0" & Chr(1) ElseIf LCase(Username) = "All" Then frmMain.sckClient.SendData "@F" & Message & ".0" & Chr(1) End If ' Stop the data from showing. Exit Function End If End Function