Submitted by Easton on Fri, 05/07/2010 - 04:31
Been bored lately, so I'd thought I'd make an IRCÂ bot in PHP. I wasn't sure how they worked, so IÂ found this to be great: http://www.hawkee.com/snippet/5330/
IÂ added a little more to it, using switch()Â instead of an if statement. So, instead of:
if ($rawcmd[1] == "!sayit") {
IÂ changed it to
Â
 switch(rtrim($rawcmd[1])) {
Â
and of course everything else in between.Â
See the full code here: http://pastebin.com/4F9XPkVx or here http://pastebin.org/205819
Not much has changed, but with switch() I found it easier to add more commands. Again, IÂ didn't write most of it. Feel free to test it out though.