Hi there,
I'm writing a php irc bot believe it or not, and while doing some of the commands that "power users" are able to use, I've kinda stumped myself. At the moment, I set the raw messages sent from the server into an array, using space as a delimeter, using explode(" ",$data), However when I get a query from a "power user", I then have ANOTHER raw string that I need to seperate again.
The string looks like:
:user!user@hostmask PRIVMSG phpbot :raw 2 privmsg #chat :this is a test
I want to get everything after the "phpbot" (the nickname of the bot) and set that into an array, however I'm not totally sure how to do this, seeing as the string itself is in an array already.
I'm guessing I have to do something with foreach and sizeof($array), but I'm just not sure how to combine them..
Any help would be greatly appreciated, thanks alot 🙂