All pastes #753381 Raw Edit

Something

public text v1 · immutable
#753381 ·published 2007-10-29 05:24 UTC
rendered paste body
Private Sub btnSend_Click()
Dim textbuff As String
Dim newtext As String
Dim servercommand As String

textbuff = rtbIRC.Text
newtext = txtIRC.Text

    If sckIRC.State = sckConnected Then
        If InStr(newtext, "/") Then
            servercommand = Split(newtext, "/")
            sckIRC.SendData servercommand(1) & vbCrLf
        Else
            sckIRC.SendData "PRIVMSG " & newtext & vbCrLf
            rtbIRC.Text = textbuff & vbCrLf & newtext
            rtbIRC.SelStart = (Len(rtbIRC.Text))
            txtIRC.Text = ""
        End If
    Else
    MsgBox "Error: Not Connected"
    End If
    
    
    
End Sub