Ok, I am making my bot have the capability for the masters to say for example "~ban shoe" in the channel and the bot will do it. I got that part down, the part I am having trouble with is getting it to reconize the name (in this case shoe) after the command, anyone have any idea how I can get it to eliminate the '~ban 'part of the message when the bot sends the kick command?
Search the string for whitespace, return the string found after the whitepace. What language is this in? (/me guesses Visual Basic)
yes it is in VB.
(assuming that strData contains only the message "~ban [name]")
Dim strCommand as String
Dim strArguement as String 'can optionaly make an array
strCommand = Mid$(strData, 2, InStr(strData, " ") - 1)
strArguement = Mid$(strData, InStr(strData, " ") + 1)
In your case strCommand = "ban" and strArguement = "shoe"
Even simpler:
if Instr(textline, " ") > 1 Then
cmd = Split(textline, " ")(0)
arg1 = Split(textline, " ")(1)
end if
Read the DATES see 2003!
Quote from: Warrior on May 10, 2005, 09:08 PM
Read the DATES see 2003!
Yes, so why are you reviving old topics?
Quote from: OnlyMeat on May 11, 2005, 05:50 AM
Quote from: Warrior on May 10, 2005, 09:08 PM
Read the DATES see 2003!
Yes, so why are you reviving old topics?
He isn't. Apparently there was some "spammer" yesterday