[ScryMUD] SVN Commit Info r705 - trunk/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Sun Nov 21 13:05:30 PST 2004


Author: eroper
Date: 2004-11-21 13:05:29 -0800 (Sun, 21 Nov 2004)
New Revision: 705

Modified:
   trunk/mud/grrmud/server/command3.cc
Log:
ported r703:704 (who count) from version-2-1 branch.

--Khaav


Modified: trunk/mud/grrmud/server/command3.cc
===================================================================
--- trunk/mud/grrmud/server/command3.cc	2004-11-21 21:02:17 UTC (rev 704)
+++ trunk/mud/grrmud/server/command3.cc	2004-11-21 21:05:29 UTC (rev 705)
@@ -2582,6 +2582,7 @@
    Cell<critter*> cll(pc_list);
    critter* ptr;
    String buf(100);
+   int visible_player_count = 0;
 
    mudlog.log(TRC, "In who..\n");
 
@@ -2602,6 +2603,9 @@
       String rp_str;
       String afk_str;
 
+      //only count visible players
+      ++visible_player_count;
+
       int can_detect = FALSE;
       if (ptr->isImmort()) {
          if (pc.isImmort() && (pc.getImmLevel() >= ptr->getImmLevel())) {
@@ -2656,7 +2660,7 @@
       show(buf, pc);
    }//while
    Sprintf(buf, "\nThere are currently %i people actively playing.\n",
-           pc_list.size());
+           visible_player_count);
    pc.show(buf);
    mudlog.log(TRC, "Done with who.\n");
    return 0;




More information about the ScryMUD mailing list