I only limited it because it was a tossed together piece of crap to show newby I could do it. Since then, I've cleaned it up.
modCommands
Option Explicit
Public Sub Command(S As String, Username As String, Channel As String)
Dim Splt() As String: Splt() = Split(S, " ")
Select Case Splt(0)
Case modConstants.Trigger & "quote"
Call modquotes.addQuote(Mid(S, 8), Username, Channel)
Case modConstants.Trigger & "random"
Call frmMain.sckIRC.SendData("PRIVMSG " & modConstants.Channel & " :" & modquotes.randQuote & vbCrLf)
Case modConstants.Trigger & "say"
Call frmMain.sckIRC.SendData("PRIVMSG " & modConstants.Channel & " :" & Username & ": " & Mid(S, 6) & vbCrLf)
End Select
End Sub
modQuotes
Option Explicit
Public Sub addQuote(S As String, sUsername As String, sChannel As String)
On Error GoTo addQuote_Error
'no url for you
Dim Quote As String: Quote = "<" & sUsername & ":" & sChannel & "> " & S
Call frmMain.inetPHP.OpenURL("no url for you" & Encode(Quote))
Call frmMain.sckIRC.SendData("PRIVMSG " & modConstants.Channel & " :" & sUsername & ": Quote added - " & Quote & vbCrLf)
Exit Sub
addQuote_Error:
Call frmMain.sckIRC.SendData("PRIVMSG " & modConstants.Channel & " :" _
& "RTE " & Err.Number & " (" & Err.Description & ") in module addQuotes of prjAmeeVB." & vbCrLf)
End Sub
Public Function randQuote() As String
On Error GoTo randQuote_Error
Randomize
Dim Splt() As String: Splt = Split(frmMain.inetPHP.OpenURL("http://www.javaop.com/~joe/ameevb/AmeeVB.php"), vbLf)
randQuote = Splt(Int(Rnd * (UBound(Splt))) + 1)
Exit Function
randQuote_Error:
Call frmMain.sckIRC.SendData("PRIVMSG " & modConstants.Channel & " :" _
& "RTE " & Err.Number & " (" & Err.Description & ") in module modQuotes of prjAmeeVB." & vbCrLf)
End Function