query_pl_level.c

skylib_mudos_v1/mudlib/secure/master/query_pl_level.c · 661 B

From the archive skylib_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

/*  -*- LPC -*-  */

/*
 * There are several occasions when the game driver wants to check if
 * a player has permission to specific things.
 *
 * These types are implemented so far:
 * "trace":		If the player is allowed to use tracing.
 * "wizard":            Is the player considered at least a "minimal" wizard?
 * "error messages":    Is the player allowed to get run time error messages?
 */

int query_player_level( string what ) {
   if ( !this_player() )
      return 0;
   switch ( what ) {
      case "error messages" :
         return 1;
      case "trace" :
      case "wizard" :
         return (int)creatorp(TP);
   }
} /* query_player_level() */

Site Stats

Snippets: 1791
Codebases: 571