Hello,
when i start and go to localhost/bot.php it says:
"Undefine Offset on line 113"
Here's the code:
unction main($config)
{
$data = fgets($this->socket, 256);
echo nl2br($data);
flush();
$this->ex = explode(' ', $data);
if($this->ex[0] == 'PING')
{
$this->send_data('PONG', $this->ex[1]); //Plays ping-pong with the server to stay connected.
}
LINE 113 >> $Command = str_replace(array(chr(10), chr(13)), '', $this->ex[3]);
switch($Command) //List of commands the bot responds to from a user.
{
case ':!join':
$this->join_channel($this->ex[4]);
break;
case ':!part':
$this->send_data('PART '.$this->ex[4].' :', 'Wildphp.com Free IRC Bot Script');
break;
case ':!say':
$message = "";
for($i=5; $i <= (count($this->ex)); $i++)
{
$message .= $this->ex[$i]." ";
}
$this->send_data('PRIVMSG '.$this->ex[4].' :', $message);
break;
case ':!restart':
echo "<meta http-equiv=\"refresh\" content=\"5\">";
exit;
case ':!shutdown':
$this->send_data('QUIT', 'Wildphp.com Free IRC Bot Script');
exit;
}
$this->main($config);
}