]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/clientcommands.c
Append .zip to ZIP files generated by release script
[dragonblocks_alpha.git] / src / clientcommands.c
index 574a18eb5eaebf001ae6304110040c5b018fecd3..5b99d34a8b0e7f0601216ff4f16b1eefa478de16 100644 (file)
@@ -4,8 +4,10 @@
 
 static bool disconnect_handler(Client *client, bool good)
 {
+       (void) client;
+
        if (good)
-               client_disconnect(client, false, NULL);
+               client_disconnect(false, NULL);
        return true;
 }
 
@@ -31,17 +33,7 @@ static bool auth_handler(Client *client, bool good)
 
 static bool block_handler(Client *client, bool good)
 {
-       MapBlock *block = map_deserialize_block(client->fd);
-
-       if (! block)
-               return false;
-
-       if (good)
-               map_add_block(client->map, block);
-       else
-               map_free_block(block);
-
-       return true;
+       return map_deserialize_block(client->fd, client->map, ! good);
 }
 
 CommandHandler command_handlers[CLIENT_COMMAND_COUNT] = {