| Home | Trees | Index | Help |
|
|---|
| Package lyntin :: Module session :: Class Session |
|
A session is a nice container of all the stuff that encompasses a user session: aliases, actions, commands...
All input and output goes through the Session object. Almost everything happens through the Session.| Method Summary | |
|---|---|
Initialize. | |
__repr__(self)
| |
Adds data to the buffer by thinking about everything in terms of lines. | |
Clears the session (except for connections). | |
Clears the databuffer. | |
| list of strings |
Returns the DataBuffer instance for this session. |
| string |
Returns the name of the session. |
| SocketCommunicator |
Returns the socket communicator. |
| string |
Returns status of the session. |
getVariable(self,
var,
default)
| |
Handles input coming from the mud. | |
Handles input in the context of this session specifically. | |
| boolean |
Tells you whether (1) or not (0) a session has a connection. |
Deals with printing a prompt if this is the common session. | |
Removes a variable from the local _vars dict. | |
Changes the buffer max. | |
Sets the name of the session. | |
Sets the socket communicator. | |
setupCommonSession(self)
| |
Sets a variable value. | |
Shuts down the session, shuts down the underlying SocketCommunicator. | |
Writes data to the socket. | |
This calls the variable_change_hook. | |
| Class Variable Summary | |
|---|---|
dict |
global_vars = {}
|
| Method Details |
|---|
__init__(self,
engine_instance)
Initialize.
|
addToDataBuffer(self, text)Adds data to the buffer by thinking about everything in terms of lines.
|
clear(self)Clears the session (except for connections). Goes through the list of managers registered with the engine and calls the clear method with itself. |
clearDataBuffer(self)Clears the databuffer. |
getDataBuffer(self)Returns the DataBuffer instance for this session.
|
getName(self)Returns the name of the session.
|
getSocketCommunicator(self)Returns the socket communicator.
|
getStatus(self)Returns status of the session. Most specifically the session name, the socket we're connected to.
|
handleMudData(self, input)Handles input coming from the mud.
|
handleUserData(self, input, internal=0)Handles input in the context of this session specifically.
|
isConnected(self)Tells you whether (1) or not (0) a session has a connection.
|
prompt(self)Deals with printing a prompt if this is the common session. |
removeVariable(self, var)Removes a variable from the local _vars dict. This also spams the variable_change_hook.
|
resizeDataBuffer(self, newsize=10000)Changes the buffer max.
|
setName(self, name)Sets the name of the session.
|
setSocketCommunicator(self, sc)Sets the socket communicator.
|
setVariable(self, var, expansion)Sets a variable value. This also calls the variable_change_hook.
|
shutdown(self, args)Shuts down the session, shuts down the underlying SocketCommunicator.
|
writeSocket(self, message, tag=None)Writes data to the socket.
|
_varChangeHook(self, var, old, new)This calls the variable_change_hook. It allows other modules to know when variable values are changed so that they can handle those changes accordingly. |
| Class Variable Details |
|---|
global_vars
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Aug 9 09:17:42 2004 | http://epydoc.sf.net |