send
Indigo/send · 568 B
From the archive indigo001.tgz
Download the archive « Back to the archive contents
<?
$char_list = array();
function add_player( $d, $player_object )
{
global $char_list;
$char_list[$d] = $player_object;
}
function remove_player( $d )
{
global $char_list;
unset( $char_list[$d] );
return;
}
function bust_a_prompt( $player )
{
send_to_desc( $player->sock_id, $player->name.$player->prompt );
}
function game_log( $message )
{
$date = date("Y-m-d g:i a");
$fp = fopen("game.log", "a");
fputs($fp, "$date ".$message);
fclose($fp);
return;
}
function send_to_desc( $descriptor, $message )
{
socket_write($descriptor, "$message");
}
?>