about summary refs log tree commit diff homepage
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/server.c b/server.c
index 37f57ca..bd4e980 100644
--- a/server.c
+++ b/server.c
@@ -359,6 +359,16 @@ static bool clientMap(const struct Client *client) {
 	return true;
 }
 
+static bool clientTele(struct Client *client, uint8_t port) {
+	if (port >= ARRAY_LEN(Ports)) return false;
+	struct Client old = *client;
+	client->tileX = Ports[port].tileX;
+	client->tileY = Ports[port].tileY;
+	client->cellX = CellInitX;
+	client->cellY = CellInitY;
+	return clientUpdate(client, &old);
+}
+
 int main(int argc, char *argv[]) {
 	int error;
 
@@ -477,6 +487,9 @@ int main(int argc, char *argv[]) {
 			break; case ClientMap: {
 				success = clientMap(client);
 			}
+			break; case ClientTele: {
+				success = clientTele(client, msg.port);
+			}
 		}
 		if (!success) clientRemove(client);
 	}
1&id=6c63959d98511c90d721c46fee7d4d756b598b99&follow=1'>Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe