From 61350d3c8d37c34cd66384e7170831a354a0ae0f Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Thu, 29 Aug 2013 09:55:10 +0000 Subject: [PATCH 1/1] i wonder.... --- mud.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mud.php b/mud.php index 9e347a3..74607f3 100644 --- a/mud.php +++ b/mud.php @@ -150,6 +150,23 @@ class mud extends model { 'ssii', $msg, 'yell', $this->player->room, $this->player->id); } +// private function tell($msg) { +// // lookup dest +// $this->insert( +// 'INSERT INTO messages (message,type,room,source) VALUES(?,?,?,?)', +// 'ssii', $msg, 'tell', $this->player->room, $this->player->id); +// } + + private function say($msg) { + $this->insert( + 'INSERT INTO messages (message,type,room,source) VALUES(?,?,?,?)', + 'ssii', $msg, 'say', $this->player->room, $this->player->id); + } + + private function move() { + // ahhhhhhhhhhhhhhhhhhhh + } + private function poll() { $time = isset($_SESSION['last_polled']) ? $_SESSION['last_polled'] : 0; $messages = $this->query( @@ -180,6 +197,7 @@ class mud extends model { switch ($cmd) { case 'start': $this->response($this->universe->serialize()); +// $this->response($this->universe->serialize($_GET['restart'])); break; case 'join': $this->response($this->join()); @@ -202,6 +220,10 @@ class mud extends model { case 'poll': echo json_encode($this->poll()); break; +// case 'respawn': +// session_destroy() +// session_start() +// $this->response($this->join()); default: $this->error(400, 'Unknown command'); } -- 2.30.2