+ char * log_prefix = "LOG ";
+ if (!strcmp(msg, "THINGS_BELOW_PLAYER START"))
+ {
+ ret = 1;
+ things_below_player_parsing = 1;
+ free(world.things_below_player);
+ world.things_below_player = NULL;
+ }
+ else if (!strcmp(msg, "THINGS_BELOW_PLAYER END"))
+ {
+ things_below_player_parsing = 0;
+ if (!world.things_below_player)
+ {
+ nl_append_string("(nothing)", &world.things_below_player);
+ }
+ }
+ else if (things_below_player_parsing)
+ {
+ ret = 1;
+ nl_append_string(msg, &world.things_below_player);
+ }
+ else if (!strncmp(msg, log_prefix, strlen(log_prefix)))
+ {
+ ret = 1;
+ nl_append_string(msg + strlen(log_prefix), &world.log);
+ }
+ else if (!strcmp(msg, "NEW_WORLD"))
+ {
+ ret = 1;
+ free(world.log);
+ world.log = NULL;
+ }
+ else if (!strcmp(msg, "WORLD_UPDATED"))
+ {
+ free(world.things_below_player);
+ world.things_below_player = NULL;
+ send("STACK");
+ }
+ free(msg);