CMCommon, Session, CMObject, Modifiable, CMRunnable, java.lang.Cloneable, java.lang.Comparable<CMObject>, java.lang.Runnablepublic class FakeSession extends java.lang.Object implements Session
Session.InputCallback, Session.SessionFilter, Session.SessionStatus, Session.TickingCallback| Modifier and Type | Field | Description | 
|---|---|---|
| protected java.io.ByteArrayOutputStream | bout | |
| protected static char[] | COLOR_CRLF | |
| protected java.util.Vector<java.lang.String> | inputV | |
| protected MOB | mob | |
| protected boolean | stripCRLF | |
| protected boolean | stripSnoop | |
| protected java.lang.String | stripStr | |
| protected java.util.Set<java.lang.Integer> | telnet | |
| protected CMFile | theFile | 
idConverterMAX_PREVMSGS, MSDP_ARRAY_CLOSE, MSDP_ARRAY_OPEN, MSDP_CHARSET, MSDP_TABLE_CLOSE, MSDP_TABLE_OPEN, MSDP_VAL, MSDP_VAR, TELNET_AARD, TELNET_ANSI, TELNET_ANSI16, TELNET_ATCP, TELNET_AYT, TELNET_BINARY, TELNET_COMPRESS, TELNET_COMPRESS2, TELNET_DESCS, TELNET_DO, TELNET_DONT, TELNET_EC, TELNET_ECHO, TELNET_GA, TELNET_GMCP, TELNET_IAC, TELNET_LINEMODE, TELNET_LINEMODE_MODE, TELNET_LINEMODE_MODEMASK_ACK, TELNET_LINEMODE_MODEMASK_EDIT, TELNET_LINEMODE_MODEMASK_TRAPSIG, TELNET_LINEMODE_SLC, TELNET_LINEMODE_SLC_ACK, TELNET_LINEMODE_SLC_AO, TELNET_LINEMODE_SLC_AYT, TELNET_LINEMODE_SLC_BRK, TELNET_LINEMODE_SLC_CANTCHANGE, TELNET_LINEMODE_SLC_DEFAULT, TELNET_LINEMODE_SLC_EOF, TELNET_LINEMODE_SLC_EOR, TELNET_LINEMODE_SLC_IP, TELNET_LINEMODE_SLC_NOSUPPORT, TELNET_LINEMODE_SLC_SUSP, TELNET_LINEMODE_SLC_VALUE, TELNET_LINEMODE_SLC_XOFF, TELNET_LINEMODE_SLC_XON, TELNET_LOGOUT, TELNET_MSDP, TELNET_MSP, TELNET_MSSP, TELNET_MXP, TELNET_NAWS, TELNET_NOP, TELNET_SB, TELNET_SE, TELNET_SUPRESS_GO_AHEAD, TELNET_TERMTYPE, TELNET_TOGGLE_FLOW_CONTROL, TELNET_WILL, TELNET_WONT, TELNETBYTES_END_SB, TELNETBYTES_GMCP_HEAD, TELNETGABYTES| Constructor | Description | 
|---|---|
| FakeSession() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| long | activeTimeMillis() | Returns the number of milliseconds this runnable
 has been running. | 
| boolean | addSessionFilter(Session.SessionFilter filter) | Adds a new text filter to this session, which can
 modify any text immediately before it is sent
 to the user. | 
| boolean | autoLogin(java.lang.String name,
         java.lang.String password) | If the session is in a non-logged in state (or even if it
 is), this will automatically login the user with the given
 name and password, and switch the session to the main loop. | 
| java.lang.String | blockingIn(long timeoutMillis,
          boolean filter) | Blocks the current thread until the user attached to this session
 hits ENTER, returning the characters they enter. | 
| void | changeTelnetMode(int telnetCode,
                boolean onOff) | Change telnet mode by sending the appropriate command to the clients client. | 
| java.lang.String | choose(java.lang.String Message,
      java.lang.String Choices,
      java.lang.String Default) | Prompts the user to enter one character responses from a set of
 valid choices. | 
| java.lang.String | choose(java.lang.String Message,
      java.lang.String Choices,
      java.lang.String Default,
      long maxTime) | Prompts the user to enter one character responses from a set of
 valid choices. | 
| java.lang.String | choose(java.lang.String Message,
      java.lang.String Choices,
      java.lang.String Default,
      long maxTime,
      java.util.List<java.lang.String> paramsOut) | Prompts the user to enter one character responses from a set of
 valid choices. | 
| void | cmdExit(MOB mob,
       java.util.List<java.lang.String> commands) | |
| void | colorOnlyPrint(java.lang.String msg) | Lower-Medium-level text output method. | 
| void | colorOnlyPrint(java.lang.String msg,
              boolean noCache) | Lower-Medium-level text output method. | 
| void | colorOnlyPrintln(java.lang.String msg) | Lower-Medium-level text output method. | 
| void | colorOnlyPrintln(java.lang.String msg,
                boolean noCache) | Lower-Medium-level text output method. | 
| int | compareTo(CMObject o) | |
| boolean | confirm(java.lang.String Message,
       java.lang.String Default) | Prompts the user to enter Y or N, and returns what they
 enter. | 
| boolean | confirm(java.lang.String Message,
       java.lang.String Default,
       long maxTime) | Prompts the user to enter Y or N, and returns what they
 enter. | 
| int | convertEscape(java.lang.StringBuffer str,
             int index) | |
| CMObject | copyOf() | Similar to Cloneable.clone(), but does its best to make sure that
 any internal objects to this class are also copyOfed. | 
| java.lang.String | getAddress() | Gets the current telnet clients ip address. | 
| java.lang.String | getAfkMessage() | Returns the reason given by the user that they are AFK. | 
| boolean | getClientTelnetMode(int telnetCode) | Gets a client telnet mode flag. | 
| java.lang.String[] | getColorCodes() | Returns a list of standard/foreground telnet coded strings
 indexed by coffeemud color code. | 
| ColorLibrary.ColorState | getCurrentColor() | Returns the current color code. | 
| int | getGroupID() | The group identifier for this runnable, which may be used
 for executor selection | 
| java.lang.String | getGroupName() | Returns the group name to which this session belongs | 
| java.util.Enumeration<java.util.List<java.lang.String>> | getHistory() | Returns the entire command history cached by this session. | 
| long | getIdleMillis() | Gets the number of milliseconds since a user entry was registered by this session | 
| long | getInputLoopTime() | Returns the last time in milliseconds that this session began its input loop. | 
| ColorLibrary.ColorState | getLastColor() | Returns the previous current color code. | 
| java.util.List<java.lang.String> | getLastMsgs() | Returns a list of the last several message strings received by this user. | 
| long | getLastNPCFight() | Gets the milliseconds timestamp since this user last registered a npc fight. | 
| long | getLastPKFight() | Gets the milliseconds timestamp since this user last registered a pk fight. | 
| long | getMillisOnline() | Gets the milliseconds elapsed since this user came online. | 
| java.util.List<java.lang.String> | getPreviousCMD() | Returns a pre-parsed, pre-filtered list of strings
 representing the last command entered by the user
 through this session. | 
| int | getSaveStatIndex() | Returns the index into the stat codes array where extra savable fields begins. | 
| boolean | getServerTelnetMode(int telnetCode) | Gets a server telnet mode flag. | 
| long | getStartTime() | Either the time this runnable did start running, or
 will start running, depending on whether it's scheduled | 
| java.lang.String | getStat(java.lang.String code) | An alternative means of retreiving the values of those fields on this object which are modifiable at
 run-time by builders. | 
| java.lang.String[] | getStatCodes() | Returns an array of the string names of those fields which are modifiable on this object at run-time by
 builders. | 
| Session.SessionStatus | getStatus() | Gets the tick/thread status of this session object. | 
| java.lang.String | getTerminalType() | Gets the terminal type the user has | 
| long | getTickStatus() | |
| long | getTotalMillis() | Gets the total milliseconds consumed by this session objects thread. | 
| long | getTotalTicks() | Gets the total number of ticks consumed by this session object thread. | 
| int | getWrap() | Gets the column number for engine word-wrapping. | 
| char | hotkey(long maxWait) | Waits the given milliseconds for a key to be pressed, after which
 it returns that key, or \0 if nothing pressed. | 
| java.lang.String | ID() | The CoffeeMud Java Class ID shared by all instances of
 this object. | 
| void | initializeClass() | Called ONCE after all objects are loaded, but before the map is read in
 during initialization. | 
| void | initializeSession(java.net.Socket s,
                 java.lang.String groupName,
                 java.lang.String introTextStr) | Negotiates various telnet options (or attempts to), and
 prints the introTextStr to the user. | 
| void | initTelnetMode(int mobbitmap) | Initializes a telnet mode between this session and the connected client by negotiating
 certain fundamental flags, like ANSI, MXP, and MSP. | 
| boolean | isAfk() | Returns whether this mob/session is currently Away From Keyboard | 
| boolean | isAllowedMcp(java.lang.String packageName,
            float version) | Returns true if this client supports the given package at the
 given version. | 
| boolean | isAllowedMxp(java.lang.String tag) | Returns true if the given max tag will be accepted by the client. | 
| boolean | isBeingSnoopedBy(Session S) | Checks to see if the given session is snooping on this one. | 
| boolean | isFake() | Returns true if this session is merely a placeholder,
 and does not represent an actual user connection. | 
| boolean | isLockedUpWriting() | Checks whether this session is currently over its
 time limit trying to write data to its socket. | 
| boolean | isPendingLogin(java.lang.String otherLoginName) | Returns whether this session is engaged in a login/account
 menu transaction. | 
| boolean | isRunning() | Whether this session is currently actively interacting with the user in
 some way -- whether this session currently has "thread time". | 
| boolean | isStat(java.lang.String code) | An alternative means of retreiving the values of those fields on this object which are modifiable at
 run-time by builders. | 
| boolean | isStopped() | Returns whether this session is done, or slated to be done. | 
| boolean | isWaitingForInput() | Returns whether this session is waiting for input | 
| void | logout(boolean b1) | Allows the user to select a different character, taking them back to the login
 prompt, or to the account character listing screen, whichever is appropriate. | 
| MOB | mob() | Returns the player MOB attached to this session object. | 
| java.lang.String | name() | The displayable name of this object. | 
| void | negotiateTelnetMode(int code) | Change telnet mode by negotiating the command to the clients client. | 
| CMObject | newInstance() | Returns a new instance of this class. | 
| void | onlyPrint(java.lang.String msg) | Low level text output method. | 
| void | onlyPrint(java.lang.String msg,
         boolean noCache) | Low level text output method. | 
| ColorLibrary.ColorState | popMarkedColor() | Returns the marked color code. | 
| void | print(Physical Source,
     Environmental Target,
     Environmental Tool,
     java.lang.String msg) | Medium-level text output method. | 
| void | print(java.lang.String msg) | Medium-level text output method. | 
| void | println(Physical Source,
       Environmental Target,
       Environmental Tool,
       java.lang.String msg) | Medium-level text output method. | 
| void | println(java.lang.String msg) | Medium-level text output method. | 
| void | prompt(Session.InputCallback callBack) | Puts the session into an input state, returning immediately. | 
| java.lang.String | prompt(java.lang.String Message) | Prompts the user to enter a string, and then returns what
 the enter. | 
| java.lang.String | prompt(java.lang.String Message,
      long maxTime) | Prompts the user to enter a string, and then returns what
 the enter. | 
| java.lang.String | prompt(java.lang.String Message,
      java.lang.String Default) | Prompts the user to enter a string, and then returns what
 the enter. | 
| java.lang.String | prompt(java.lang.String Message,
      java.lang.String Default,
      long maxTime) | Prompts the user to enter a string, and then returns what
 the enter. | 
| void | promptPrint(java.lang.String msg) | Medium-level text output method. | 
| void | pushMarkedColor(ColorLibrary.ColorState newcolor) | Sets the marked color code. | 
| void | rawCharsOut(char[] c) | Lowest level user-output method. | 
| void | rawOut(java.lang.String msg) | Lowest level user-output method. | 
| void | rawPrint(java.lang.String msg) | Low level line-output method. | 
| void | rawPrint(java.lang.String msg,
        int pageBreak) | |
| void | rawPrintln(java.lang.String msg) | Low level line-output method. | 
| void | rawPrintln(java.lang.String msg,
          int pageBreak) | |
| java.lang.String | readlineContinue() | Blocks for a short amount of time, returning an input
 string only if the user happens to have hit enter. | 
| void | run() | |
| void | safeRawPrint(java.lang.String msg) | Low level line-output method. | 
| void | safeRawPrintln(java.lang.String msg) | Low level line-output method. | 
| boolean | sendGMCPEvent(java.lang.String eventName,
             java.lang.String json) | Potentially sends the GMCP event of the given name with the given json
 doc. | 
| boolean | sendMcpCommand(java.lang.String packageCommand,
              java.lang.String parms) | Sends a properly formatted MCP command to the session, if it or its package is supported. | 
| void | setAccount(PlayerAccount account) | Sets the player acount attached to this session object. | 
| void | setAfkFlag(boolean truefalse) | Sets whether this mob/session is currently Away From Keyboard | 
| void | setAFKMessage(java.lang.String str) | Returns the reason given by the user that they are AFK. | 
| void | setBeingSnoopedBy(Session session,
                 boolean onOff) | Notifies this session that the given session is snooping it. | 
| void | setClientTelnetMode(int telnetCode,
                   boolean onOff) | Sets a client telnet mode flag. | 
| void | setCurrentColor(ColorLibrary.ColorState newcolor) | Sets the current color code. | 
| void | setFakeInput(java.lang.String input) | Send this session fake input as if the user had typed it in. | 
| void | setGroupName(java.lang.String group) | Sets the group name to which this session belongs | 
| void | setIdleTimers() | Resets the internal idle timers. | 
| void | setInputLoopTime() | Sets the last time in milliseconds that this session began its input loop. | 
| void | setLastColor(ColorLibrary.ColorState newColor) | Returns the previous current color code. | 
| void | setLastNPCFight() | Sets now as the milliseconds timestamp since this user last registered a npc fight. | 
| void | setLastPKFight() | Sets now as the milliseconds timestamp since this user last registered a pk fight. | 
| void | setMob(MOB newmob) | Sets the player MOB attached to this session object. | 
| void | setPromptFlag(boolean truefalse) | Notifies this session to output the users prompt
 again once it has reached a suitable lapse in
 text output. | 
| void | setServerTelnetMode(int telnetCode,
                   boolean onOff) | Sets a server telnet mode flag. | 
| void | setStat(java.lang.String code,
       java.lang.String val) | An alternative means of setting the values of those fields on this object which are modifiable at
 run-time by builders. | 
| void | setStatus(Session.SessionStatus newStatus) | Sets the tick/thread status of this session object. | 
| int | snoopSuspension(int x) | Increments or decrements the snoop suspension counter
 by the given amount. | 
| void | stdPrint(Physical Source,
        Environmental Target,
        Environmental Tool,
        java.lang.String msg) | Higher-level line output method. | 
| void | stdPrint(java.lang.String msg) | Higher-level line output method. | 
| void | stdPrintln(Physical Source,
          Environmental Target,
          Environmental Tool,
          java.lang.String msg) | Higher-level line output method. | 
| void | stdPrintln(java.lang.String msg) | Higher-level line output method. | 
| void | stopSession(boolean t1,
           boolean t2,
           boolean t3) | Force the current player to logoff, end the session, and/or kill the thread. | 
| boolean | tick(Tickable ticking,
    int tickID) | |
| void | wraplessPrint(java.lang.String msg) | Medium-level text output method. | 
| void | wraplessPrintln(java.lang.String msg) | Medium-level text output method. | 
protected CMFile theFile
protected java.io.ByteArrayOutputStream bout
protected MOB mob
protected boolean stripSnoop
protected boolean stripCRLF
protected java.util.Vector<java.lang.String> inputV
protected java.util.Set<java.lang.Integer> telnet
protected static final char[] COLOR_CRLF
protected java.lang.String stripStr
public boolean tick(Tickable ticking, int tickID)
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic CMObject copyOf()
CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public long getTickStatus()
public void initializeSession(java.net.Socket s,
                              java.lang.String groupName,
                              java.lang.String introTextStr)
SessioninitializeSession in interface Sessions - the socket the user connected fromgroupName - the name of the thread group the session goes tointroTextStr - introductory text string (Hello!)public java.lang.String getGroupName()
SessiongetGroupName in interface Sessionpublic void setGroupName(java.lang.String group)
SessionsetGroupName in interface Sessiongroup - the thread group namepublic long getStartTime()
CMRunnablegetStartTime in interface CMRunnablepublic boolean addSessionFilter(Session.SessionFilter filter)
SessionaddSessionFilter in interface Sessionfilter - the filter to addpublic int getGroupID()
CMRunnablegetGroupID in interface CMRunnablepublic boolean isLockedUpWriting()
SessionisLockedUpWriting in interface Sessionpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic void run()
run in interface java.lang.Runnablepublic boolean isRunning()
Sessionpublic boolean isPendingLogin(java.lang.String otherLoginName)
SessionisPendingLogin in interface SessionotherLoginName - another login name potentially matchpublic void logout(boolean b1)
Sessionpublic java.lang.String getTerminalType()
SessiongetTerminalType in interface Sessionpublic void negotiateTelnetMode(int code)
SessionnegotiateTelnetMode in interface Sessioncode - the telnet codeSession.TELNET_ANSI, 
Session.TELNET_ANSI16, 
Session.setClientTelnetMode(int, boolean), 
Session.setServerTelnetMode(int, boolean)public boolean isAllowedMxp(java.lang.String tag)
SessionisAllowedMxp in interface Sessiontag - the tag to checkpublic boolean isFake()
Sessionpublic void setIdleTimers()
SessionsetIdleTimers in interface SessionSession.getIdleMillis()public boolean sendGMCPEvent(java.lang.String eventName,
                             java.lang.String json)
SessionsendGMCPEvent in interface SessioneventName - the event name, like comm.channeljson - the json doc, like {"blah":"BLAH"}public void setFakeInput(java.lang.String input)
SessionsetFakeInput in interface Sessioninput - text to send.public java.lang.String[] getColorCodes()
SessiongetColorCodes in interface Sessionpublic void onlyPrint(java.lang.String msg,
                      boolean noCache)
SessiononlyPrint in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.rawCharsOut(char[])public void onlyPrint(java.lang.String msg)
SessiononlyPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void rawOut(java.lang.String msg)
SessionrawOut in interface Sessionmsg - the string to send to the userSession.rawCharsOut(char[])public void rawPrintln(java.lang.String msg)
SessionrawPrintln in interface Sessionmsg - the string to send to the userSession.rawPrintln(String)public void safeRawPrintln(java.lang.String msg)
SessionsafeRawPrintln in interface Sessionmsg - the string to send to the userSession.safeRawPrint(String)public void rawPrintln(java.lang.String msg,
                       int pageBreak)
public void rawPrint(java.lang.String msg)
SessionrawPrint in interface Sessionmsg - the string to send to the userSession.rawPrint(String)public void safeRawPrint(java.lang.String msg)
SessionsafeRawPrint in interface Sessionmsg - the string to send to the userSession.safeRawPrintln(String)public void rawPrint(java.lang.String msg,
                     int pageBreak)
public void stdPrint(java.lang.String msg)
SessionstdPrint in interface Sessionmsg - the string to send to the userSession.rawPrint(String)public void stdPrint(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
SessionstdPrint in interface SessionSource - variable for special code parsing: SourceTarget - variable for special code parsing: TargetTool - variable for special code parsing: Toolmsg - the string to send to the userSession.rawPrint(String)public void stdPrintln(java.lang.String msg)
SessionstdPrintln in interface Sessionmsg - the string to send to the userSession.rawPrintln(String)public void stdPrintln(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
SessionstdPrintln in interface SessionSource - variable for special code parsing: SourceTarget - variable for special code parsing: TargetTool - variable for special code parsing: Toolmsg - the string to send to the userSession.rawPrintln(String)public void rawCharsOut(char[] c)
SessionrawCharsOut in interface Sessionc - string (as char array) to send out to the userpublic void print(java.lang.String msg)
Sessionprint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean), 
Session.promptPrint(String)public void promptPrint(java.lang.String msg)
SessionpromptPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void print(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Sessionprint in interface SessionSource - variable for special code parsing: SourceTarget - variable for special code parsing: TargetTool - variable for special code parsing: Toolmsg - the string to send to the userSession.onlyPrint(String, boolean)public void println(java.lang.String msg)
Sessionprintln in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void println(Physical Source, Environmental Target, Environmental Tool, java.lang.String msg)
Sessionprintln in interface SessionSource - variable for special code parsing: SourceTarget - variable for special code parsing: TargetTool - variable for special code parsing: Toolmsg - the string to send to the userSession.onlyPrint(String, boolean)public void wraplessPrintln(java.lang.String msg)
SessionwraplessPrintln in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void wraplessPrint(java.lang.String msg)
SessionwraplessPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void colorOnlyPrintln(java.lang.String msg,
                             boolean noCache)
SessioncolorOnlyPrintln in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.onlyPrint(String, boolean)public void colorOnlyPrint(java.lang.String msg,
                           boolean noCache)
SessioncolorOnlyPrint in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.onlyPrint(String, boolean)public void colorOnlyPrintln(java.lang.String msg)
SessioncolorOnlyPrintln in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void colorOnlyPrint(java.lang.String msg)
SessioncolorOnlyPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void setPromptFlag(boolean truefalse)
SessionsetPromptFlag in interface Sessiontruefalse - true to send another prompt, false otherwisepublic char hotkey(long maxWait)
Sessionpublic java.lang.String prompt(java.lang.String Message,
                               java.lang.String Default)
Sessionprompt in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits enterSession.prompt(String), 
Session.prompt(String, long), 
Session.prompt(String, String, long)public void prompt(Session.InputCallback callBack)
Sessionprompt in interface SessioncallBack - the callback to modify and make when doneSession.InputCallbackpublic java.lang.String prompt(java.lang.String Message,
                               java.lang.String Default,
                               long maxTime)
Sessionprompt in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing outSession.prompt(String), 
Session.prompt(String, String), 
Session.prompt(String, long)public java.lang.String prompt(java.lang.String Message)
Sessionprompt in interface SessionMessage - the prompt message to display to the userSession.prompt(String, String), 
Session.prompt(String, long), 
Session.prompt(String, String, long)public java.lang.String prompt(java.lang.String Message,
                               long maxTime)
Sessionprompt in interface SessionMessage - the prompt message to display to the usermaxTime - max number of milliseconds to wait before timing outSession.prompt(String), 
Session.prompt(String, String), 
Session.prompt(String, String, long)public boolean confirm(java.lang.String Message,
                       java.lang.String Default)
Sessionconfirm in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits enterSession.confirm(String, String, long)public boolean confirm(java.lang.String Message,
                       java.lang.String Default,
                       long maxTime)
Sessionconfirm in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing outSession.confirm(String, String)public java.lang.String choose(java.lang.String Message,
                               java.lang.String Choices,
                               java.lang.String Default)
Sessionchoose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits enterSession.choose(String, String, String, long)public java.lang.String choose(java.lang.String Message,
                               java.lang.String Choices,
                               java.lang.String Default,
                               long maxTime,
                               java.util.List<java.lang.String> paramsOut)
                        throws java.io.IOException
Sessionchoose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing outparamsOut - an empty list to put any extra crap added to the end of the choice.java.io.IOException - a disconnectSession.choose(String, String, String, long)public java.lang.String choose(java.lang.String Message,
                               java.lang.String Choices,
                               java.lang.String Default,
                               long maxTime)
Sessionchoose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing outSession.choose(String, String, String)public java.lang.String blockingIn(long timeoutMillis,
                                   boolean filter)
SessionblockingIn in interface SessiontimeoutMillis - milliseconds before InterruptedIOException thrownfilter - true to allow normal coffeemud input filteringpublic java.lang.String readlineContinue()
SessionreadlineContinue in interface Sessionpublic void setBeingSnoopedBy(Session session, boolean onOff)
SessionsetBeingSnoopedBy in interface Sessionsession - the session to snoop on me.onOff - true to turn on snooping, false otherwiseSession.setBeingSnoopedBy(Session, boolean), 
Session.isBeingSnoopedBy(Session), 
Session.snoopSuspension(int)public boolean isBeingSnoopedBy(Session S)
SessionisBeingSnoopedBy in interface SessionS - the session to check for a snoop on me.Session.setBeingSnoopedBy(Session, boolean), 
Session.isBeingSnoopedBy(Session), 
Session.snoopSuspension(int)public int snoopSuspension(int x)
SessionsnoopSuspension in interface Sessionx - the amount to change the snoop suspension counter bySession.setBeingSnoopedBy(Session, boolean), 
Session.isBeingSnoopedBy(Session), 
Session.snoopSuspension(int)public void cmdExit(MOB mob, java.util.List<java.lang.String> commands) throws java.lang.Exception
java.lang.Exceptionpublic void stopSession(boolean t1,
                        boolean t2,
                        boolean t3)
SessionstopSession in interface Sessiont1 - true to remove the mob from the gamet2 - true to force closed sockets, and removed sessiont3 - true to force a thread death, and false to be more lenientSession.isStopped()public boolean isStopped()
SessionisStopped in interface SessionSession.logout(boolean), 
Session.isStopped()public boolean isAfk()
SessionisAfk in interface SessionSession.setAfkFlag(boolean), 
Session.setAFKMessage(String)public void setAfkFlag(boolean truefalse)
SessionsetAfkFlag in interface Sessiontruefalse - true if they are AFK, false otherwiseSession.isAfk(), 
Session.getAfkMessage()public java.lang.String getAfkMessage()
SessiongetAfkMessage in interface SessionSession.setAfkFlag(boolean), 
Session.setAFKMessage(String)public void setAFKMessage(java.lang.String str)
SessionsetAFKMessage in interface Sessionstr - the reason given by the user that they are AFK.Session.setAfkFlag(boolean), 
Session.getAfkMessage()public java.util.List<java.lang.String> getPreviousCMD()
SessiongetPreviousCMD in interface Sessionpublic java.util.Enumeration<java.util.List<java.lang.String>> getHistory()
SessiongetHistory in interface Sessionpublic MOB mob()
Sessionmob in interface SessionSession.setMob(MOB)public void setMob(MOB newmob)
SessionsetMob in interface Sessionnewmob - the player MOB attached to this session object.Session.mob()public void setAccount(PlayerAccount account)
SessionsetAccount in interface Sessionaccount - the player account attached to this session object.Session.mob()public int convertEscape(java.lang.StringBuffer str,
                         int index)
public void setCurrentColor(ColorLibrary.ColorState newcolor)
SessionsetCurrentColor in interface Sessionnewcolor - the color to change it topublic void setLastColor(ColorLibrary.ColorState newColor)
SessionsetLastColor in interface SessionnewColor - the color to change it topublic void pushMarkedColor(ColorLibrary.ColorState newcolor)
SessionpushMarkedColor in interface Sessionnewcolor - the color to change it topublic ColorLibrary.ColorState getCurrentColor()
SessiongetCurrentColor in interface Sessionpublic ColorLibrary.ColorState popMarkedColor()
SessionpopMarkedColor in interface Sessionpublic ColorLibrary.ColorState getLastColor()
SessiongetLastColor in interface Sessionpublic int getWrap()
Sessionpublic java.lang.String getAddress()
SessiongetAddress in interface Sessionpublic Session.SessionStatus getStatus()
SessiongetStatus in interface SessionSession.SessionStatuspublic void setStatus(Session.SessionStatus newStatus)
SessionsetStatus in interface SessionnewStatus - the tick statusSession.SessionStatuspublic boolean isWaitingForInput()
SessionisWaitingForInput in interface Sessionpublic long getTotalMillis()
SessiongetTotalMillis in interface Sessionpublic long getTotalTicks()
SessiongetTotalTicks in interface Sessionpublic long getIdleMillis()
SessiongetIdleMillis in interface SessionSession.setIdleTimers()public long getMillisOnline()
SessiongetMillisOnline in interface Sessionpublic long getLastPKFight()
SessiongetLastPKFight in interface SessionSession.setLastPKFight(), 
Session.setLastNPCFight()public void setLastPKFight()
SessionsetLastPKFight in interface SessionSession.getLastPKFight(), 
Session.getLastNPCFight()public long getLastNPCFight()
SessiongetLastNPCFight in interface SessionSession.setLastPKFight(), 
Session.setLastNPCFight()public void setLastNPCFight()
SessionsetLastNPCFight in interface SessionSession.getLastPKFight(), 
Session.getLastNPCFight()public long getInputLoopTime()
SessiongetInputLoopTime in interface SessionSession.setInputLoopTime()public void setInputLoopTime()
SessionsetInputLoopTime in interface SessionSession.getInputLoopTime()public java.util.List<java.lang.String> getLastMsgs()
SessiongetLastMsgs in interface Sessionpublic void setServerTelnetMode(int telnetCode,
                                boolean onOff)
SessionsetServerTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI, 
Session.getServerTelnetMode(int)public boolean getServerTelnetMode(int telnetCode)
SessiongetServerTelnetMode in interface SessiontelnetCode - the telnet codeSession.TELNET_ANSI, 
Session.setServerTelnetMode(int, boolean)public void setClientTelnetMode(int telnetCode,
                                boolean onOff)
SessionsetClientTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI, 
Session.getClientTelnetMode(int)public boolean getClientTelnetMode(int telnetCode)
SessiongetClientTelnetMode in interface SessiontelnetCode - the telnet codeSession.TELNET_ANSI, 
Session.setClientTelnetMode(int, boolean)public void changeTelnetMode(int telnetCode,
                             boolean onOff)
SessionchangeTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI, 
Session.TELNET_ANSI16, 
Session.setClientTelnetMode(int, boolean), 
Session.setServerTelnetMode(int, boolean)public void initTelnetMode(int mobbitmap)
SessioninitTelnetMode in interface Sessionmobbitmap - the mobbitmap the bitmap of mob flags to use as a guide in negotiationMOB.getAttributesBitmap(), 
MOB.Attrib, 
Session.changeTelnetMode(int, boolean)public int getSaveStatIndex()
ModifiablegetSaveStatIndex in interface ModifiableModifiable.getStatCodes(), 
Modifiable.getStat(String), 
Modifiable.setStat(String, String)public java.lang.String getStat(java.lang.String code)
ModifiablegetStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public java.lang.String[] getStatCodes()
ModifiablegetStatCodes in interface ModifiableModifiable.getStat(String), 
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
ModifiableisStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public void setStat(java.lang.String code,
                    java.lang.String val)
ModifiablesetStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public long activeTimeMillis()
CMRunnableactiveTimeMillis in interface CMRunnablepublic boolean isAllowedMcp(java.lang.String packageName,
                            float version)
SessionisAllowedMcp in interface SessionpackageName - the package to checkversion - the version of the package to checkpublic boolean sendMcpCommand(java.lang.String packageCommand,
                              java.lang.String parms)
SessionsendMcpCommand in interface SessionpackageCommand - the fully formed commandparms - the variable parameters, already well formedpublic boolean autoLogin(java.lang.String name,
                         java.lang.String password)
Session