wyvern.world
Class AccessControl

java.lang.Object
  extended bywyvern.world.AccessControl

public final class AccessControl
extends java.lang.Object

Implements various security and access policies for the server.

Version:
1.0, Oct 1, 2000
Author:
Steve Yegge

Field Summary
static java.util.HashSet elders_
           
static java.util.HashSet gods_
           
static java.util.HashSet juniors_
           
static java.util.HashSet seniors_
           
static java.util.HashSet wizards_
           
 
Constructor Summary
AccessControl()
           
 
Method Summary
static boolean checkPassword(java.lang.String name, java.lang.String password)
          Validates a player's password.
static boolean isElderWizard(java.lang.String name)
          Returns true if the player is an Elder Wizard.
static boolean isGod(java.lang.String name)
          Returns true if the player is a God.
static boolean isJuniorWizard(java.lang.String name)
          Returns true if the player is a Junior wizard.
static boolean isSeniorWizard(java.lang.String name)
          Returns true if the player is Senior Wizard.
static boolean isWizard(java.lang.String name)
          Returns true if the player is a (mid-level) Wizard.
static void reset()
          Resets all the lists, forcing it to reload the files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gods_

public static java.util.HashSet gods_

elders_

public static java.util.HashSet elders_

seniors_

public static java.util.HashSet seniors_

wizards_

public static java.util.HashSet wizards_

juniors_

public static java.util.HashSet juniors_
Constructor Detail

AccessControl

public AccessControl()
Method Detail

isGod

public static boolean isGod(java.lang.String name)
Returns true if the player is a God.


isElderWizard

public static boolean isElderWizard(java.lang.String name)
Returns true if the player is an Elder Wizard.


isSeniorWizard

public static boolean isSeniorWizard(java.lang.String name)
Returns true if the player is Senior Wizard.


isWizard

public static boolean isWizard(java.lang.String name)
Returns true if the player is a (mid-level) Wizard.


isJuniorWizard

public static boolean isJuniorWizard(java.lang.String name)
Returns true if the player is a Junior wizard.


checkPassword

public static boolean checkPassword(java.lang.String name,
                                    java.lang.String password)
Validates a player's password. Works even if the player isn't currently logged in.

Parameters:
name - the player's name
password - the (unencrypted) password
Returns:
true if the password is correct

reset

public static void reset()
Resets all the lists, forcing it to reload the files. Used for new wizards and promotions on the fly.