[CODE] Bug in db.c, is_empty()

From: Andrey Fidrya (andrey@alex-ua.com)
Date: 07/06/99


db.c, is_empty():
1) Characters in NOWHERE (imms, for example) can crash the MUD.
2) Immortals in zone will keep it from being reset.

is_empty():
===
  for (i = descriptor_list; i; i = i->next)
    if (STATE(i) == CON_PLAYING)
-     if (world[i->character->in_room].zone == zone_nr)
+     if (GET_LEVEL(i->character) < LVL_IMMORT && IN_ROOM(i->character) > -1
&&
+         world[IN_ROOM(i->character)].zone == zone_nr)
    return 0;
===

Zmey // 3MoonsWorld (rmud.net.ru:4000)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST