privs.h

musicmud-2.1.6/include/privs.h · 893 B

From the archive musicmud2.1.6.tar.gz

Download the archive   « Back to the archive contents

#ifndef PRIVS_H
#define PRIVS_H

class MudObject;

#define LEV_NEWBIE    1         /* Cadet */

#define LEV_COMMANDER 17
#define LEV_RETIRED   18       /* Retired */

#define LEV_CAPTAIN   19       /* Senior officers      */
#define LEV_COMMODORE 9993

#define LEV_ADMIRAL 9997     /* Commanding Officers */
#define LEV_CHIEF 9999

#define LEV_INTERNAL 100000

#define IS_CHIEF(who) (privs_of(who)>=LEV_CHIEF)
#define IS_ADMIRAL(who) (privs_of(who)>=LEV_ADMIRAL)
#define IS_COMMODORE(who) (privs_of(who)>=LEV_COMMODORE)
#define IS_CAPTAIN(who) (privs_of(who)>=LEV_CAPTAIN)
#define IS_COMMANDER(who) (privs_of(who)>=LEV_COMMANDER)

//! return the (un-remorted) level of who
int level_of(const MudObject *);

//! return the effective level of who
int privs_of(const MudObject *who, int def=0);

#ifdef PFLAGS_H
//! find a number of given pflag name
PFlag find_priv(const char *);
#endif

#endif

Site Stats

Snippets: 1791
Codebases: 571