objcount.c

final_realms_fluffos_v1/lib/cmds/demi/objcount.c · 466 B

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

// Asmodean  4-13-97
// Count Object Types
// Taken from Lima Lib object as a test
//  


#include <cmd.h>
inherit CMD_BASE;

int cmd(string args, object me)
 {
     int min;
 
     mapping counts = ([ ]);
     
     objects((: $(counts)[base_name($1)]++ :));
        if (!args)
             min = 2;
               else 
               sprintf(min, "%i", args);
         counts = filter(counts, (: $2 > $(min) :));
   write(sprintf("%O\n", counts));
  return 1;
 }

Site Stats

Snippets: 1791
Codebases: 571