com.planet_ink.coffee_mud.core
Class CMSecurity

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.CMSecurity

public class CMSecurity
extends java.lang.Object

supported: AFTER, AHELP, ANNOUNCE, AT, BAN, BEACON, BOOT, CHARGEN COPYMOBS, COPYITEMS, COPYROOMS, CMDQUESTS, CMDSOCIALS, CMDROOMS, CMDITEMS, CMDEXITS, CMDAREAS, CMDRACES, CMDCLASSES, NOPURGE, KILLBUGS, KILLIDEAS, KILLTYPOS, CMDCLANS, DUMPFILE, GOTO, LOADUNLOAD, CMDPLAYERS POSSESS, SHUTDOWN, SNOOP, STAT, SYSMSGS, TICKTOCK, TRANSFER, WHERE RESET, RESETUTILS, KILLDEAD, MERGE, IMPORTROOMS, IMPORTMOBS, IMPORTITEMS IMPORTPLAYERS, EXPORT, EXPORTPLAYERS, EXPORTFILE, RESTRING, PURGE, TASKS ORDER (includes TAKE, GIVE, DRESS, mob passivity, all follow) I3, ABOVELAW (also law books), WIZINV (includes see WIZINV), CMDABILITIES CMDMOBS (also prevents walkaways), KILLASSIST, ALLSKILLS, GMODIFY, CATALOG SUPERSKILL (never fails skills), IMMORT (never dies), MXPTAGS, IDLEOK JOURNALS, PKILL, SESSIONS, TRAILTO, CMDFACTIONS, COMPONENTS, EXPERTISES, TITLES FS:relative path from /coffeemud/ -- read/write access to regular file sys VFS:relative path from /coffeemud/ -- read/write access to virtual file sys LIST: (affected by killx, cmdplayers, loadunload, cmdclans, ban, nopurge, cmditems, cmdmobs, cmdrooms, sessions, cmdareas, listadmin, stat


Field Summary
protected  java.util.Vector compiledSysop
           
protected static java.util.HashSet dbgVars
           
protected static java.util.HashSet disVars
           
protected  java.util.Hashtable groups
           
protected static java.util.HashSet saveFlags
           
protected  long startTime
           
 
Constructor Summary
CMSecurity()
           
 
Method Summary
static void addGroup(java.lang.String name, java.util.HashSet set)
           
static void addGroup(java.lang.String name, java.lang.String set)
           
static void addGroup(java.lang.String name, java.util.Vector set)
           
static void approveJScript(java.lang.String approver, long hashCode)
           
static int ban(java.lang.String banMe)
           
static boolean canAccessFile(MOB mob, Room room, java.lang.String path, boolean isVFS)
           
static boolean canTraverseDir(MOB mob, Room room, java.lang.String path)
           
static void clearGroups()
           
static java.util.Vector getAccessibleDirs(MOB mob, Room room)
           
static java.util.Hashtable getApprovedJScriptTable()
           
static java.util.Vector getSecurityCodes(MOB mob, Room room)
           
static long getStartTime()
           
static boolean hasAccessibleDir(MOB mob, Room room)
           
static CMSecurity instance()
           
static CMSecurity instance(char c)
           
static boolean isAllowed(MOB mob, Room room, java.lang.String code)
           
static boolean isAllowedAnywhere(MOB mob, java.lang.String code)
           
static boolean isAllowedEverywhere(MOB mob, java.lang.String code)
           
static boolean isAllowedStartsWith(MOB mob, Room room, java.lang.String code)
           
static boolean isAllowedStartsWith(MOB mob, java.lang.String code)
           
static boolean isApprovedJScript(java.lang.StringBuffer script)
           
static boolean isASysOp(MOB mob)
           
static boolean isBanned(java.lang.String login)
           
static boolean isDebugging(java.lang.String key)
           
static boolean isDisabled(java.lang.String key)
           
static boolean isSaveFlag(java.lang.String key)
           
static boolean isStaff(MOB mob)
           
 void markShared()
           
static void parseGroups(java.util.Properties page)
           
static void setDebugVars(java.lang.String vars)
           
static void setDisableVar(java.lang.String var, boolean delete)
           
static void setDisableVars(java.lang.String vars)
           
static void setSaveFlag(java.lang.String flag, boolean delete)
           
static void setSaveFlags(java.lang.String flags)
           
static void setSysOp(java.lang.String zapCheck)
           
static void unban(int unBanMe)
           
static void unban(java.lang.String unBanMe)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTime

protected final long startTime

groups

protected java.util.Hashtable groups

compiledSysop

protected java.util.Vector compiledSysop

disVars

protected static java.util.HashSet disVars

dbgVars

protected static java.util.HashSet dbgVars

saveFlags

protected static java.util.HashSet saveFlags
Constructor Detail

CMSecurity

public CMSecurity()
Method Detail

instance

public static CMSecurity instance()

instance

public static CMSecurity instance(char c)

markShared

public void markShared()

setSysOp

public static void setSysOp(java.lang.String zapCheck)

clearGroups

public static void clearGroups()

parseGroups

public static void parseGroups(java.util.Properties page)

addGroup

public static void addGroup(java.lang.String name,
                            java.util.HashSet set)

addGroup

public static void addGroup(java.lang.String name,
                            java.util.Vector set)

addGroup

public static void addGroup(java.lang.String name,
                            java.lang.String set)

isASysOp

public static boolean isASysOp(MOB mob)

isStaff

public static boolean isStaff(MOB mob)

getAccessibleDirs

public static java.util.Vector getAccessibleDirs(MOB mob,
                                                 Room room)

hasAccessibleDir

public static boolean hasAccessibleDir(MOB mob,
                                       Room room)

canTraverseDir

public static boolean canTraverseDir(MOB mob,
                                     Room room,
                                     java.lang.String path)

canAccessFile

public static boolean canAccessFile(MOB mob,
                                    Room room,
                                    java.lang.String path,
                                    boolean isVFS)

getSecurityCodes

public static java.util.Vector getSecurityCodes(MOB mob,
                                                Room room)

isAllowedStartsWith

public static boolean isAllowedStartsWith(MOB mob,
                                          Room room,
                                          java.lang.String code)

isAllowed

public static boolean isAllowed(MOB mob,
                                Room room,
                                java.lang.String code)

isAllowedStartsWith

public static boolean isAllowedStartsWith(MOB mob,
                                          java.lang.String code)

isAllowedEverywhere

public static boolean isAllowedEverywhere(MOB mob,
                                          java.lang.String code)

isAllowedAnywhere

public static boolean isAllowedAnywhere(MOB mob,
                                        java.lang.String code)

isDebugging

public static boolean isDebugging(java.lang.String key)

isDisabled

public static boolean isDisabled(java.lang.String key)

isSaveFlag

public static boolean isSaveFlag(java.lang.String key)

approveJScript

public static void approveJScript(java.lang.String approver,
                                  long hashCode)

getApprovedJScriptTable

public static java.util.Hashtable getApprovedJScriptTable()

isApprovedJScript

public static boolean isApprovedJScript(java.lang.StringBuffer script)

setDebugVars

public static void setDebugVars(java.lang.String vars)

setDisableVars

public static void setDisableVars(java.lang.String vars)

setDisableVar

public static void setDisableVar(java.lang.String var,
                                 boolean delete)

setSaveFlags

public static void setSaveFlags(java.lang.String flags)

setSaveFlag

public static void setSaveFlag(java.lang.String flag,
                               boolean delete)

getStartTime

public static long getStartTime()

isBanned

public static boolean isBanned(java.lang.String login)

unban

public static void unban(java.lang.String unBanMe)

unban

public static void unban(int unBanMe)

ban

public static int ban(java.lang.String banMe)