function handle_socket($socket) { global $antiflog; global $irc_pause; if ($irc_pause == True) { return; } if (is_resource($socket) == False) { return; } $data = fgets($socket); if ($data !== False) { write_out_buffer_sock($data); $antiflog = False; if (pingpong($data) == False) { handle_data($data, True); } } }
} else { $tokens = explode(" ", $data); if (count($tokens) == 2 and strtoupper($tokens[0]) == "FORWARD") { $forward = $tokens[1]; term_echo("*** FORWARD SET: ALL DATA WILL BE FORWARDED TO {$forward} ON EXEC BOT HOST NETWORK"); } unset($tokens); } } } $data = fgets($socket); if ($data === False) { continue; } $data = trim($data); if (pingpong($data) == True) { continue; } term_echo($bot_nick . " >> " . $data); $items = parse_data($data); if ($items === False) { continue; } if ($items["cmd"] == 376) { if (isset($parts[2]) == True) { term_echo("joining \"" . $parts[2] . "\"..."); dojoin($parts[2]); } else { term_echo("joining \"{$dest}\"..."); dojoin($dest); term_echo("joining \"#\"...");