commands(); } } } function commands() { $text = explode(' ', $text); $command = $text[0]; if ($command == "?rehash") { socket_write($link, "PRIVMSG darkBot-01 :rehash\r\n"); } if ($command == "?version") { socket_write($link,"PRIVMSG $target :hellraz0r i rock?\r\n"); } if ($command == "?getabot") { socket_write($link, "PRIVMSG $target :HOLD ONN!\r\n"); $query = "INSERT INTO `bots` (botname, command) VALUES ('darkBot-01', 'PRIVMSG $target :kay mysql thing works\r\n')"; mysql_query($query) or die(mysql_error()); socket_write($link, "PRIVMSG darkBot-01 :rehash\r\n"); } } } $doit = new createBot(); $doit->create(); ?>