Re: [CODE] who cmd

From: Itay Chumash (itay_c@hotmail.com)
Date: 09/09/01


Hello,
This is what i did to seperate Imms and mortals:
in act.informative.c, ACMD(do_who), add:

char count=0;

where it says: send_to_char("Players\r\n-------\r\n", ch);
replace with:

for (count=0; count<2; count++)
  {
    if (count) send_to_char("\nPlayers\r\n--------\r\n", ch);
   else send_to_char("Immortals\r\n----------\r\n", ch);

after:
if (d->original)
      tch = d->original;
    else if (!(tch = d->character))
      continue;

add:
if ((count && (GET_LEVEL(tch) < LVL_IMMORT)) ||
(!count && (GET_LEVEL(tch)>= LVL_IMMORT)) )
 {

now just end it in the right spot (it is different in some versions)
in my mud (circle 3.0 bpl17) i ended both the loop and the
if statement just before the line:

if (short_list && (num_can_see % 4))

hope it will work for you too.

Itay.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST