Author | Message | Time |
---|---|---|
DarkMod | 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? | March 21, 2003, 6:00 PM |
Eibro | Search the string for whitespace, return the string found after the whitepace. What language is this in? (/me guesses Visual Basic) | March 21, 2003, 6:37 PM |
DarkMod | yes it is in VB. | March 21, 2003, 7:48 PM |
n00blar | (assuming that strData contains only the message "~ban [name]") [code] 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) [/code] In your case strCommand = "ban" and strArguement = "shoe" | March 21, 2003, 8:58 PM |
Grok | Even simpler: [code]if Instr(textline, " ") > 1 Then cmd = Split(textline, " ")(0) arg1 = Split(textline, " ")(1) end if[/code] | March 22, 2003, 12:11 AM |
Quarantine | Read the DATES see 2003! | May 11, 2005, 2:08 AM |
OnlyMeat | [quote author=Warrior link=topic=498.msg111963#msg111963 date=1115777303] Read the DATES see 2003! [/quote] Yes, so why are you reviving old topics? | May 11, 2005, 10:50 AM |
UserLoser. | [quote author=OnlyMeat link=topic=498.msg112041#msg112041 date=1115808603] [quote author=Warrior link=topic=498.msg111963#msg111963 date=1115777303] Read the DATES see 2003! [/quote] Yes, so why are you reviving old topics? [/quote] He isn't. Apparently there was some "spammer" yesterday | May 11, 2005, 11:47 AM |