public class CMSecurity
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
CMSecurity.ConnectState |
When an external connection occurs, this is the resulting
state from examining the incoming ip address against the
various security checks.
|
static class |
CMSecurity.DbgFlag |
This enum represents all permitted DEBUG flags.
|
static class |
CMSecurity.DisFlag |
The enum that represents all the defined DISABLE flags.
|
static class |
CMSecurity.SaveFlag |
Save flags enum, for either turning off things that are normally saved to the database periodically, or
turning on things that are not normally saved so that they do so.
|
static class |
CMSecurity.SecFlag |
This enum represents all of the base security flags in the system.
|
static class |
CMSecurity.SecGroup |
Internal security class for a group of security flags, and which
may also containing other groups.
|
static class |
CMSecurity.SecPath |
A class representing a file path, either local or virtual, that
a user can be given special access to.
|
Modifier and Type | Field | Description |
---|---|---|
protected java.util.Set<java.lang.String> |
ablDisVars |
|
protected java.util.Set<java.lang.String> |
clsDisVars |
|
protected java.util.Map<java.lang.String,java.lang.String[]> |
clsEnaVars |
|
protected java.util.Set<java.lang.String> |
cmdDisVars |
|
protected MaskingLibrary.CompiledZMask |
compiledSysop |
|
static long |
CONN_LAST_DELAY_MS |
|
static long |
CONN_MAX_PER_ADDR |
|
protected java.util.Set<CMSecurity.DbgFlag> |
dbgVars |
|
protected static boolean |
debuggingEverything |
|
protected java.util.Set<CMSecurity.DisFlag> |
disVars |
|
protected static java.lang.String[] |
emptyStrArray |
|
protected java.util.Set<java.lang.String> |
expDisVars |
|
protected java.util.Set<java.lang.String> |
facDisVars |
|
protected java.util.Map<java.lang.String,CMSecurity.SecGroup> |
groups |
|
protected java.util.Set<java.lang.String> |
journalFlags |
|
static int |
JSCRIPT__NO_APPROVAL |
|
static int |
JSCRIPT_ALL_APPROVAL |
|
static int |
JSCRIPT_REQ_APPROVAL |
|
protected java.util.Set<java.lang.String> |
racDisVars |
|
protected java.util.Map<java.lang.String,java.lang.String[]> |
racEnaVars |
|
protected java.util.Set<CMSecurity.SaveFlag> |
saveFlags |
|
static CMSecurity.SecGroup |
SECURITY_CMD_GROUP |
Predefined security group set containing security flags related to the creation,
modification, and destruction of most subsystems, including basic map editing abilities.
|
static CMSecurity.SecGroup |
SECURITY_COPY_GROUP |
Predefined security group set containing security flags related to the ability
to copy existing mobs, items, and rooms around when building rooms and areas.
|
static CMSecurity.SecGroup |
SECURITY_EXPORT_GROUP |
Predefined security group set containing security flags related to the ability to export
mobs, items, players, and rooms to a local file.
|
static CMSecurity.SecGroup |
SECURITY_GOTO_GROUP |
Predefined security group set containing security flags related to the ability to jump
around on the map freely.
|
static CMSecurity.SecGroup |
SECURITY_IMPORT_GROUP |
Predefined security group set containing security flags related to the ability to import
mobs, items, players, and rooms from local files into the map.
|
static CMSecurity.SecGroup |
SECURITY_KILL_GROUP |
Predefined security group set containing security flags related to the ability to
instantly kill other mobs and players.
|
protected long |
startTime |
Constructor | Description |
---|---|
CMSecurity() |
Creates a new thread-group sensitive CMSecurity reference object.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
_isDisabled(CMSecurity.DisFlag flag) |
Checks to see if the given feature denoted by the given DisFlag
is disabled.
|
static void |
approveJScript(java.lang.String approver,
long hashCode) |
For muds using the JavaScript approval system, as specified in the coffeemud.ini
file, this method approves a JavaScript as being permitted to run, and saves
the record of the approval.
|
static int |
ban(java.lang.String banMe) |
Adds the given player name, account name, or ip address to the official ::/resources/banned.ini file
It also adds it to the cached ban list.
|
static boolean |
canAccessFile(MOB mob,
Room room,
java.lang.String path,
boolean isVFS) |
Checks whether the given user/player mob, in the given room location, can access a file at the given
path, with the given VFS (database) status.
|
static boolean |
canTraverseDir(MOB mob,
Room room,
java.lang.String path) |
Checks whether the given user/player mob, in the given room location, can see a directory at the given
path.
|
static void |
clearConnectState(java.net.Socket sock) |
If the given socket appears on the temporary ip block list,
then this will remove the entry.
|
static void |
clearGroups() |
Removes all registered security groups.
|
CMSecurity.SecGroup |
createGroup(java.lang.String name,
java.util.List<java.lang.String> set) |
Create a new security group object with the given name, and the given
set of security flags/group names as a string list.
|
static java.util.List<java.lang.String> |
getAccessibleDirs(MOB mob,
Room room) |
Returns a comprehensive list of all filesystem directories which the given user/player, in the given room
location, may access
|
static java.lang.String[] |
getAnyFlagEnabledParms(java.lang.String anyFlag) |
If the feature described by the given anyFlag is enabled, this will
return any parameters defined along with it.
|
static java.util.Map<java.lang.Long,java.lang.String> |
getApprovedJScriptTable() |
For muds using the JavaScript approval system, this method returns
the list of approval script approver names and their script hash value keys.
|
static java.util.Enumeration<CMSecurity.DisFlag> |
getBasicDisablesEnum() |
Returns an enumeration of all basic and special DisFlags that are currently set,
meaning all the standard basic systems returned are disabled presently.
|
static CMSecurity.ConnectState |
getConnectState(java.net.Socket sock,
int[] numAtAddress) |
Checks the ban list, ip block whitelist, temporary block list, and black list for the
given ip address in the given socket, and returns the appropriate state.
|
static java.util.Enumeration<CMSecurity.DbgFlag> |
getDebugEnum() |
An enumeration of all system currently being debugged.
|
static java.util.Enumeration<java.lang.String> |
getDisabledAbilitiesEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled ability IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledCharClassEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled character class IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledCommandsEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled command IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledExpertisesEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled expertise IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledFactionsEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled faction IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledRacesEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled race IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getDisabledSpecialsEnum(boolean addINIPrefix) |
Returns an enumeration of the disabled ability IDs, command IDs, expertise IDs, and faction IDs
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.Object> |
getDisablesEnum() |
Returns an enumeration of all disable flags that are currently set,
meaning all the things returned are disabled presently.
|
static java.util.Enumeration<java.lang.String> |
getEnabledCharClassEnum(boolean addINIPrefix) |
Returns an enumeration of the enabled character class IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getEnabledRacesEnum(boolean addINIPrefix) |
Returns an enumeration of the enabled race IDs,
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getEnabledSpecialsEnum(boolean addINIPrefix) |
Returns an enumeration of the enabled ability IDs, command IDs, charclass IDs, and race IDs
complete with flag prefix, if requested.
|
static java.util.Enumeration<java.lang.String> |
getEnablesEnum() |
Returns an enumeration of all basic enables flags that are currently set,
meaning all the things returned are enabled, but normally disabled presently.
|
static java.util.Enumeration<java.lang.String> |
getJournalSecurityFlags() |
Returns an enumeration of all journal security flags, which are usually just
a bunch of journal id names.
|
protected static java.util.Enumeration<java.lang.String> |
getSafeEnumerableEnableParmSet(java.util.Map<java.lang.String,java.lang.String[]> map,
java.lang.String prefix) |
Returns an enumeration of the enabled IDs, with parms, and
complete with flag prefix, if requested.
|
static java.util.Iterator<CMSecurity.SecFlag> |
getSecurityCodes(MOB mob,
Room room) |
Returns an iterator of all security flags that apply to the given user/player mob
for their given room location, which allows subop (area) flags to also be included,
if the mob is in their subop area.
|
static java.util.Enumeration<CMSecurity.SecGroup> |
getSecurityGroups() |
Returns an enumeration of all existing Security Groups
|
static java.lang.String |
getSocketAddress(java.net.Socket sock) |
Returns the String version of the socket ip address,
or the word 'unknown'.
|
static long |
getStartTime() |
How long the system has bee running, in milliseconds, I guess.
|
static boolean |
hasAccessibleDir(MOB mob,
Room room) |
Checks whether the given user/player mob, in the given room location, can see ANY filesystem files.
|
static CMSecurity |
instance() |
Returns the CMSecurity instance tied to this particular thread group, or creates a new one.
|
static CMSecurity |
instance(char c) |
Returns the CMSecurity instance tied to this particular thread group, or null if not yet created.
|
static CMSecurity |
instance(Session session) |
Returns the CMSecurity instance tied to this particular session, or main.
|
static boolean |
isAbilityDisabled(java.lang.String ID) |
Check to see if the given Ability is disabled.
|
static boolean |
isAllowed(MOB mob,
Room room,
CMSecurity.SecFlag flag) |
A Security System check method.
|
static boolean |
isAllowedAnywhere(MOB mob,
CMSecurity.SecFlag flag) |
A Security system check method.
|
static boolean |
isAllowedAnywhereContainsAny(MOB mob,
CMSecurity.SecGroup secGroup) |
Checks whether the given mob has any of the security flags denoted by the given security group.
|
static boolean |
isAllowedContainsAny(MOB mob,
Room room,
CMSecurity.SecGroup secGroup) |
Checks whether the given mob, currently in the given room, has any of the security flags
denoted by the given security group.
|
static boolean |
isAllowedEverywhere(MOB mob,
CMSecurity.SecFlag flag) |
A Security system check method.
|
static boolean |
isAnyFlagDisabled(java.lang.String anyFlag) |
Returns whether the feature described by the given anyFlag is disabled.
|
static boolean |
isAnyFlagEnabled(java.lang.String anyFlag) |
Returns whether the feature described by the given anyFlag is enabled.
|
static boolean |
isApprovedJScript(java.lang.StringBuffer script) |
Checks whether the given specific javascript is allowed to run, given the javascript
security settings.
|
static boolean |
isASysOp(PlayerLibrary.ThinPlayer mob) |
Checks whether the given user/player ThinPlayer object is a full-on
admin of the entire mud, having all the power the system offers.
|
static boolean |
isASysOp(MOB mob) |
Checks whether the given user/player MOB is a full-on Archon, an
admin of the entire mud, having all the power the system offers.
|
static boolean |
isASysOp(MOB mob,
char threadId) |
Checks whether the given user/player MOB is a full-on Archon, an
admin of the entire mud, having all the power the system offers.
|
static boolean |
isBanned(java.lang.String login) |
Returns true if the given name or ip address or whatever is found in the official ::/resources/banned.ini
file, which is cached in a list for quick access.
|
static boolean |
isCharClassDisabled(java.lang.String ID) |
Check to see if the given Character Class is disabled.
|
static boolean |
isCharClassEnabled(java.lang.String ID) |
Check to see if the given Character Class is enabled.
|
static boolean |
isCommandDisabled(java.lang.String ID) |
Check to see if the given Command is disabled.
|
static boolean |
isDebugging(CMSecurity.DbgFlag key) |
Checks if the given key system is being debugged.
|
static boolean |
isDebuggingSearch(java.lang.String key) |
Checks if the given key system is being debugged by finding the DbgFlag object
that corresponds to the key name, and seeing if it is on the list of debugged
systems.
|
static boolean |
isDisabled(CMSecurity.DisFlag flag) |
Checks to see if the given feature denoted by the given DisFlag
is disabled.
|
static boolean |
isExpertiseDisabled(java.lang.String ID) |
Check to see if the given expertise is disabled.
|
static boolean |
isFactionDisabled(java.lang.String ID) |
Check to see if the given Faction is disabled.
|
static boolean |
isIPBlocked(java.lang.String ipAddress) |
Returns true if the given IP4 address is blocked, and false otherwise
|
static boolean |
isJournalAccessAllowed(MOB mob,
java.lang.String journalFlagName) |
Checks whether the given user/player mob has admin privileges on the given journal
|
static boolean |
isRaceDisabled(java.lang.String ID) |
Check to see if the given Race is disabled.
|
static boolean |
isRaceEnabled(java.lang.String ID) |
Check to see if the given Race is enabled.
|
static boolean |
isSaveFlag(CMSecurity.SaveFlag key) |
Returns whether the given save flag is set, denoting something
that should not be saved but normally is, or something that
should be saved, but normally isn't
|
static boolean |
isStaff(MOB mob) |
Checks to see if the given user/player mob has any special security flags at all.
|
void |
markShared() |
Designates that the thread which called this method should instead use the security system
of the MAIN_HOST, sharing it.
|
static void |
parseGroups(java.util.Properties page) |
Iterates through all the properties on the given property page, finding
any security group definitions and, when found, registering them with
the security system.
|
java.lang.Object |
parseSecurityFlag(java.lang.String s) |
Accepts a string representing a security flag, or another group name, or a filesystem path,
or some other security designation, and returns the appropriate object, such as
a SecGroup, SecPath, SecFlag, or String, that it represents.
|
static void |
registerJournal(java.lang.String journalName) |
Registers a new journal security flag, which is typically just its name
|
static boolean |
removeAnyDisableVar(java.lang.String anyFlag) |
Since there are several different kinds of disable flags, this method
allows of the different kinds to be removed/un-set simply by sending the string.
|
static boolean |
removeAnyEnableVar(java.lang.String anyFlag) |
Since there are several different kinds of enable flags, this method
allows of the different kinds to be removed/un-set simply by sending the string.
|
static boolean |
removeDebugVar(CMSecurity.DbgFlag var) |
Removes the given debug flag by removing it from the list of debug flags.
|
static boolean |
removeDebugVar(java.lang.String anyFlag) |
Removes the given debug flag by finding the flag that corresponds to the given
string and removing it from the list of debug flags.
|
static boolean |
removeDisableVar(CMSecurity.DisFlag flag) |
Removes the given disable flag, deactivating it
|
static void |
removeSaveFlag(CMSecurity.SaveFlag flag) |
Removes the given save flag, deactivating it
|
static boolean |
setAnyDisableVar(java.lang.String anyFlag) |
Since there are several different kinds of disable flags, this method
allows of the different kinds to be set simply by sending the string.
|
static void |
setAnyDisableVars(java.lang.String commaDelimFlagList) |
Sets all disable flags of all types given a list of comma-delimited
flag names in a string.
|
static boolean |
setAnyEnableVar(java.lang.String anyFlag) |
Since there are several different kinds of enable flags, this method
allows of the different kinds to be set simply by sending the string.
|
static void |
setAnyEnableVars(java.lang.String commaDelimFlagList) |
Sets all enable flags of all types given a list of comma-delimited
flag names in a string.
|
static boolean |
setDebugVar(CMSecurity.DbgFlag var) |
Sets the given debug flag by adding it to the list of debug flags.
|
static boolean |
setDebugVar(java.lang.String anyFlag) |
Sets the given debug flag by finding the flag that corresponds to the given
string and adding it to the list of debug flags.
|
static void |
setDebugVars(java.lang.String varList) |
Sets all DbgFlag debug flags given a comma-delimited list of debug
flag names.
|
static boolean |
setDisableVar(CMSecurity.DisFlag flag) |
Adds the given disable flag, activating it
|
static void |
setSaveFlag(CMSecurity.SaveFlag flag) |
Adds the given save flag, activating it
|
static void |
setSaveFlags(java.lang.String flagsListStr) |
Sets all the SaveFlags from a comma-delimited list, activating them.
|
static void |
setSysOp(java.lang.String zapCheck) |
Redefines the ZapperMask that defines what an All Powerful Super Admin of the
entire mud player looks like.
|
static void |
shareWith(char c) |
Forces the current thread group to use the security group object associated with
the given thread group id
|
static java.lang.String |
unban(int unBanMe) |
Removes the given player name, account name, or ip address that can be found at the given index
from the official ::/resources/banned.ini file.
|
static void |
unban(java.lang.String unBanMe) |
Removes the given player name, account name, or ip address from the official ::/resources/banned.ini file.
|
void |
unload() |
Clear this security class
|
static void |
unloadAll() |
Unload all security classes
|
public static final int JSCRIPT__NO_APPROVAL
public static final int JSCRIPT_REQ_APPROVAL
public static final int JSCRIPT_ALL_APPROVAL
public static final long CONN_LAST_DELAY_MS
public static final long CONN_MAX_PER_ADDR
protected static final java.lang.String[] emptyStrArray
protected final java.util.Set<CMSecurity.DisFlag> disVars
protected final java.util.Set<java.lang.String> cmdDisVars
protected final java.util.Set<java.lang.String> racDisVars
protected final java.util.Set<java.lang.String> clsDisVars
protected final java.util.Set<java.lang.String> facDisVars
protected final java.util.Set<java.lang.String> ablDisVars
protected final java.util.Set<java.lang.String> expDisVars
protected final java.util.Set<CMSecurity.DbgFlag> dbgVars
protected final java.util.Set<CMSecurity.SaveFlag> saveFlags
protected final java.util.Set<java.lang.String> journalFlags
protected final java.util.Map<java.lang.String,java.lang.String[]> racEnaVars
protected final java.util.Map<java.lang.String,java.lang.String[]> clsEnaVars
protected final long startTime
protected MaskingLibrary.CompiledZMask compiledSysop
protected final java.util.Map<java.lang.String,CMSecurity.SecGroup> groups
protected static boolean debuggingEverything
public static final CMSecurity.SecGroup SECURITY_COPY_GROUP
public static final CMSecurity.SecGroup SECURITY_GOTO_GROUP
public static final CMSecurity.SecGroup SECURITY_KILL_GROUP
public static final CMSecurity.SecGroup SECURITY_IMPORT_GROUP
public static final CMSecurity.SecGroup SECURITY_EXPORT_GROUP
public static final CMSecurity.SecGroup SECURITY_CMD_GROUP
public CMSecurity()
public static final CMSecurity instance()
public static final CMSecurity instance(char c)
c
- the thread group to checkpublic static final CMSecurity instance(Session session)
session
- the session to checkpublic static void shareWith(char c)
c
- the thread grouppublic final void markShared()
public static final void setSysOp(java.lang.String zapCheck)
zapCheck
- the zapper mask identifying an "archon" (a SysOp Admin)public static final void registerJournal(java.lang.String journalName)
journalName
- the journal security flag, or just the name/ID of the journalpublic static final void clearGroups()
public final void unload()
public static final void unloadAll()
public static final void parseGroups(java.util.Properties page)
page
- the properties page to go through.public java.lang.Object parseSecurityFlag(java.lang.String s)
s
- the security thing to parse and identifypublic final CMSecurity.SecGroup createGroup(java.lang.String name, java.util.List<java.lang.String> set)
name
- the new security group nameset
- the string list of flags/group namespublic static java.util.Enumeration<CMSecurity.SecGroup> getSecurityGroups()
public static java.util.Enumeration<java.lang.String> getJournalSecurityFlags()
public static final boolean isASysOp(MOB mob, char threadId)
mob
- the user/player to checkthreadId
- the host/thread id to check status forpublic static final boolean isASysOp(MOB mob)
mob
- the user/player to checkpublic static final boolean isASysOp(PlayerLibrary.ThinPlayer mob)
mob
- the user/player to check, as a ThinPlayer objectpublic static final boolean isStaff(MOB mob)
mob
- the user/player to checkpublic static final java.util.List<java.lang.String> getAccessibleDirs(MOB mob, Room room)
mob
- the user/player to checkroom
- the room location of the above user/playerpublic static final boolean hasAccessibleDir(MOB mob, Room room)
mob
- the user/player to checkroom
- the room location of the above user/playerpublic static final boolean canTraverseDir(MOB mob, Room room, java.lang.String path)
mob
- the user/player to checkroom
- the room location of the above user/playerpath
- the path of the file to check permissions onpublic static final boolean canAccessFile(MOB mob, Room room, java.lang.String path, boolean isVFS)
mob
- the user/player to checkroom
- the room location of the above user/playerpath
- the path of the file to check permissions onisVFS
- whether the file denoted by the above path is in the database (VFS) or notpublic static final java.util.Iterator<CMSecurity.SecFlag> getSecurityCodes(MOB mob, Room room)
mob
- the user/player to checkroom
- the room location of the above user/playerpublic static boolean isJournalAccessAllowed(MOB mob, java.lang.String journalFlagName)
mob
- the user/player to checkjournalFlagName
- the journal flag, almost always the journal IDpublic static final boolean isAllowedContainsAny(MOB mob, Room room, CMSecurity.SecGroup secGroup)
mob
- the user/player to check security settings onroom
- the user/players current room location, for subop (area) permission checkssecGroup
- the security group whose flags are cross-referenced against the players security settingspublic static final boolean isAllowed(MOB mob, Room room, CMSecurity.SecFlag flag)
mob
- the user/player to check security permissions onroom
- the current room location of the above user/playerflag
- the security flag to check forpublic static final boolean isAllowedAnywhereContainsAny(MOB mob, CMSecurity.SecGroup secGroup)
mob
- the user/player to check security settings onsecGroup
- the security group whose flags are cross-referenced against the players security settingspublic static final boolean isAllowedEverywhere(MOB mob, CMSecurity.SecFlag flag)
mob
- the player to checkflag
- the flag to look forpublic static final boolean isAllowedAnywhere(MOB mob, CMSecurity.SecFlag flag)
mob
- the player to checkflag
- the flag to look forpublic static final boolean isSaveFlag(CMSecurity.SaveFlag key)
key
- the SaveFlag enum object to check forpublic static final void approveJScript(java.lang.String approver, long hashCode)
approver
- the name of the player approving the scripthashCode
- the hash value of the script being approvedpublic static final java.util.Map<java.lang.Long,java.lang.String> getApprovedJScriptTable()
public static final boolean isApprovedJScript(java.lang.StringBuffer script)
script
- the script to checkpublic static java.util.Enumeration<CMSecurity.DbgFlag> getDebugEnum()
public static final boolean isDebugging(CMSecurity.DbgFlag key)
key
- the DbgFlag debug system to checkpublic static final boolean isDebuggingSearch(java.lang.String key)
key
- the name of the debug flag to look for.public static final boolean setDebugVar(CMSecurity.DbgFlag var)
var
- the debug flagpublic static final boolean removeDebugVar(CMSecurity.DbgFlag var)
var
- the debug flagpublic static final boolean setDebugVar(java.lang.String anyFlag)
anyFlag
- the name of the debug flagpublic static final boolean removeDebugVar(java.lang.String anyFlag)
anyFlag
- the name of the debug flagpublic static final void setDebugVars(java.lang.String varList)
varList
- the comma-delimited list of debug flags to set.public static final boolean isRaceEnabled(java.lang.String ID)
ID
- the official Race IDpublic static final boolean isCharClassEnabled(java.lang.String ID)
ID
- the official Class IDpublic static java.util.Enumeration<java.lang.String> getEnablesEnum()
public static final java.util.Enumeration<java.lang.String> getEnabledRacesEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDprotected static java.util.Enumeration<java.lang.String> getSafeEnumerableEnableParmSet(java.util.Map<java.lang.String,java.lang.String[]> map, java.lang.String prefix)
map
- the enabled set to useprefix
- the prefix to add, if anypublic static final java.util.Enumeration<java.lang.String> getEnabledCharClassEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final boolean removeAnyEnableVar(java.lang.String anyFlag)
anyFlag
- the thing to re-enablepublic static final boolean setAnyEnableVar(java.lang.String anyFlag)
anyFlag
- the thing to enablepublic static final boolean isAnyFlagEnabled(java.lang.String anyFlag)
anyFlag
- the flag to check forpublic static final java.lang.String[] getAnyFlagEnabledParms(java.lang.String anyFlag)
anyFlag
- the flag to check forpublic static final void setAnyEnableVars(java.lang.String commaDelimFlagList)
commaDelimFlagList
- the list of flags, comma delimitedpublic static final java.util.Enumeration<java.lang.String> getEnabledSpecialsEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static java.util.Enumeration<CMSecurity.DisFlag> getBasicDisablesEnum()
public static java.util.Enumeration<java.lang.Object> getDisablesEnum()
public static final boolean isDisabled(CMSecurity.DisFlag flag)
flag
- the DisFlag to check forpublic final boolean _isDisabled(CMSecurity.DisFlag flag)
flag
- the DisFlag to check forpublic static final boolean isCommandDisabled(java.lang.String ID)
ID
- the official Command IDpublic static final boolean isRaceDisabled(java.lang.String ID)
ID
- the official Race IDpublic static final boolean isCharClassDisabled(java.lang.String ID)
ID
- the official Class IDpublic static final boolean isAbilityDisabled(java.lang.String ID)
ID
- the official Ability IDpublic static final boolean isFactionDisabled(java.lang.String ID)
ID
- the official Faction IDpublic static final boolean isExpertiseDisabled(java.lang.String ID)
ID
- the official expertise IDpublic static final boolean isAnyFlagDisabled(java.lang.String anyFlag)
anyFlag
- the flag to check forpublic static final void setAnyDisableVars(java.lang.String commaDelimFlagList)
commaDelimFlagList
- the list of flags, comma delimitedpublic static final boolean removeAnyDisableVar(java.lang.String anyFlag)
anyFlag
- the thing to re-enablepublic static final boolean setAnyDisableVar(java.lang.String anyFlag)
anyFlag
- the thing to disablepublic static final java.util.Enumeration<java.lang.String> getDisabledSpecialsEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledAbilitiesEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledExpertisesEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledCommandsEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledRacesEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledCharClassEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final java.util.Enumeration<java.lang.String> getDisabledFactionsEnum(boolean addINIPrefix)
addINIPrefix
- true to add the prefix required in the ini file, false for a plain IDpublic static final boolean setDisableVar(CMSecurity.DisFlag flag)
flag
- the DisFlag to add.public static final boolean removeDisableVar(CMSecurity.DisFlag flag)
flag
- the DisFlag to remove.public static final void setSaveFlags(java.lang.String flagsListStr)
flagsListStr
- a comma-delimited list of SaveFlag namespublic static final void setSaveFlag(CMSecurity.SaveFlag flag)
flag
- the SaveFlag to add.public static final void removeSaveFlag(CMSecurity.SaveFlag flag)
flag
- the SaveFlag to remove.public static final long getStartTime()
public static boolean isIPBlocked(java.lang.String ipAddress)
ipAddress
- the IP4 address to look forpublic static final boolean isBanned(java.lang.String login)
login
- the string to look forpublic static final void unban(java.lang.String unBanMe)
unBanMe
- the player name, account name, or ip address to removepublic static final java.lang.String unban(int unBanMe)
unBanMe
- the player name, account name, or ip address index in the banned.ini file to removepublic static final int ban(java.lang.String banMe)
banMe
- the player name, account name, or ip address to addpublic static final java.lang.String getSocketAddress(java.net.Socket sock)
sock
- the socket to get the address frompublic static final void clearConnectState(java.net.Socket sock)
sock
- the socket to prevent blockage forpublic static final CMSecurity.ConnectState getConnectState(java.net.Socket sock, int[] numAtAddress)
sock
- the socket to check and bumpnumAtAddress
- null, or a 1 dimensional array to return the number of recent connsCMSecurity.ConnectState