I want to get the message that the user chats and check to see if it is a command for my "bot". Is there a function that strips name, ansi codes, etc and just returns the text, or do I have to write one myself?
Chat stuff
Posted by Poromenos on Sun 20 Jun 2004 10:41 PM — 3 posts, 16,026 views.
Well, there is StripAnsi:
http://www.gammon.com.au/scripts/doc.php?function=StripANSI
However to strip the name, that is part of the message, so you would need to do something like strip up to the quote, and past the quote, assuming there is one in the message.
http://www.gammon.com.au/scripts/doc.php?function=StripANSI
However to strip the name, that is part of the message, so you would need to do something like strip up to the quote, and past the quote, assuming there is one in the message.
Ah, great... The name is not so much hassle, the ANSI was, thanks.