+ char * log_prefix = "LOG ";
+ if (!strcmp(msg, "THINGS_HERE START"))
+ {
+ ret = 1;
+ things_here_parsing = 1;
+ free(world.things_here);
+ world.things_here = NULL;
+ }
+ else if (!strcmp(msg, "THINGS_HERE END"))
+ {
+ things_here_parsing = 0;
+ if (!world.things_here)
+ {
+ nl_append_string("(none known)", &world.things_here);
+ }
+ }
+ else if (things_here_parsing)
+ {
+ ret = 1;
+ nl_append_string(msg, &world.things_here);
+ }
+ 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"))
+ {
+ query_mapcell();
+ }
+ free(msg);