about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-09-01 13:55:48 -0400
committerJune McEnroe <june@causal.agency>2017-09-01 13:55:48 -0400
commit9915cb618fd8552372756ce3d1877d6e8564d021 (patch)
tree5c2650b3a0c7176a7edcb0f038eb033792027e3e /client.c
parentRemove clientRemove call from clientCast (diff)
downloadtorus-9915cb618fd8552372756ce3d1877d6e8564d021.tar.gz
torus-9915cb618fd8552372756ce3d1877d6e8564d021.zip
Revert "Add client readOnly mode"
This reverts commit 9a6c9c91c8092603b914cc0b3085d059e162ca29.
Diffstat (limited to '')
-rw-r--r--client.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/client.c b/client.c
index 707d50b..30a400c 100644
--- a/client.c
+++ b/client.c
@@ -44,8 +44,6 @@
 
 static int client;
 
-static bool readOnly = false;
-
 static void clientMessage(const struct ClientMessage *msg) {
     ssize_t len = send(client, msg, sizeof(*msg), 0);
     if (len < 0) err(EX_IOERR, "send");
@@ -60,7 +58,6 @@ static void clientMove(int8_t dx, int8_t dy) {
 }
 
 static void clientPut(uint8_t color, char cell) {
-    if (readOnly) return;
     struct ClientMessage msg = {
         .type = CLIENT_PUT,
         .data.p = { .color = color, .cell = cell },
@@ -384,9 +381,7 @@ static void initColors(void) {
     }
 }
 
-int main(int argc, char *argv[] UNUSED) {
-    if (argc > 1) readOnly = true;
-
+int main() {
     client = socket(PF_LOCAL, SOCK_STREAM, 0);
     if (client < 0) err(EX_OSERR, "socket");