Rearchitect for different types of response

This commit is contained in:
2018-12-20 21:10:39 +00:00
parent a8c3fa4a00
commit d72474e296
5 changed files with 74 additions and 27 deletions

View File

@@ -8,11 +8,15 @@ $room_id = BLUE_ROOM;
$msg_id = 0;
echo "Starting test REPL\n";
foreach ($handlers as $handler) {
$handler->PrintToScreen = true;
}
do {
echo $msg_id, ' > ';
$input = fread(STDIN, 80); // Read up to 80 characters or a newline
$trimmed = trim($input);
echo reply_user($room_id, $msg_id, $trimmed) , "\n";
echo reply_user($room_id, $msg_id, $trimmed, "th") , "\n";
$msg_id++;
} while($trimmed !== "exit");