BigBrotherBot v1.8.0
System Development Information for the BigBrotherBot project.

b3::parsers::smg::SmgParser Class Reference

Inheritance diagram for b3::parsers::smg::SmgParser:
b3::parsers::q3a::abstractParser::AbstractParser b3::parsers::q3a::abstractParser::AbstractParser b3::parser::Parser b3::parser::Parser b3::parser::Parser b3::parser::Parser

List of all members.

Public Member Functions

def startup
def getLineParts
def OnClientconnect
def OnClientuserinfo
def OnKill
def OnClientdisconnect
def OnInitgame
def OnSayteam
def parseUserInfo
def getTeam
def defineGameType
def getMaps
def getNextMap
def findNextMap
def sync
def connectClient
def newPlayer
def startup
def getLineParts
def OnClientconnect
def OnClientuserinfo
def OnKill
def OnClientdisconnect
def OnInitgame
def OnSayteam
def parseUserInfo
def getTeam
def defineGameType
def getMaps
def getNextMap
def findNextMap
def sync
def connectClient
def newPlayer

Static Public Attributes

string gameName = 'smg'
 PunkBuster = None
string MOD_UNKNOWN = '0'
 kill mode constants: modNames[meansOfDeath]
string MOD_KNIFE = '1'
string MOD_REM58 = '2'
string MOD_SCHOFIELD = '3'
string MOD_PEACEMAKER = '4'
string MOD_WINCHESTER66 = '5'
string MOD_LIGHTNING = '6'
string MOD_SHARPS = '7'
string MOD_REMINGTON_GAUGE = '8'
string MOD_SAWEDOFF = '9'
string MOD_WINCH97 = '10'
string MOD_GATLING = '11'
string MOD_DYNAMITE = '12'
string MOD_MOLOTOV = '13'
string MOD_WATER = '14'
string MOD_SLIME = '15'
string MOD_LAVA = '16'
string MOD_CRUSH = '17'
string MOD_TELEFRAG = '18'
string MOD_FALLING = '19'
string MOD_SUICIDE = '20'
string MOD_WORLD_DAMAGE = '21'
string MOD_TRIGGER_HURT = '22'
string MOD_NAIL = '23'
string MOD_CHAINGUN = '24'
string MOD_PROXIMITY_MINE = '25'
string MOD_BOILER = '26'
tuple Suicides
 meansOfDeath to be considered suicides

Private Attributes

 _clientConnectID

Static Private Attributes

dictionary _counter = {}
dictionary _settings = {}
string _empty_name_default = 'EmptyNameDefault'
dictionary _commands = {}
dictionary _eventMap
tuple _lineClear = re.compile(r'^(?:[0-9:.]+\s?)?')
tuple _lineFormats
tuple _regPlayer = re.compile(r'^(?P<slot>[0-9]+)\s+(?P<score>[0-9-]+)\s+(?P<ping>[0-9]+)\s+(?P<name>.*?)\s+(?P<last>[0-9]+)\s+(?P<ip>[0-9.]+):(?P<port>[0-9-]+)\s+(?P<qport>[0-9]+)\s+(?P<rate>[0-9]+)$', re.I)
tuple _reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]')

Member Function Documentation

def b3::parsers::smg::SmgParser::connectClient (   self,
  ccid 
)
def b3::parsers::smg::SmgParser::connectClient (   self,
  ccid 
)
def b3::parsers::smg::SmgParser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::smg::SmgParser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::smg::SmgParser::findNextMap (   self,
  data 
)
def b3::parsers::smg::SmgParser::findNextMap (   self,
  data 
)
def b3::parsers::smg::SmgParser::getLineParts (   self,
  line 
)
def b3::parsers::smg::SmgParser::getLineParts (   self,
  line 
)
def b3::parsers::smg::SmgParser::getMaps (   self)
\
return the available maps/levels name

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::smg::SmgParser::getMaps (   self)
\
return the available maps/levels name

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::smg::SmgParser::getNextMap (   self)
def b3::parsers::smg::SmgParser::getNextMap (   self)
def b3::parsers::smg::SmgParser::getTeam (   self,
  team 
)
def b3::parsers::smg::SmgParser::getTeam (   self,
  team 
)
def b3::parsers::smg::SmgParser::newPlayer (   self,
  cid,
  guid,
  name 
)
def b3::parsers::smg::SmgParser::newPlayer (   self,
  cid,
  guid,
  name 
)
def b3::parsers::smg::SmgParser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnClientuserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnClientuserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnKill (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnKill (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg::SmgParser::parseUserInfo (   self,
  info 
)
def b3::parsers::smg::SmgParser::parseUserInfo (   self,
  info 
)
def b3::parsers::smg::SmgParser::startup (   self)
\
Called after the parser is created before run(). Overwrite this
for anything you need to initialize you parser with.

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::smg::SmgParser::startup (   self)
\
Called after the parser is created before run(). Overwrite this
for anything you need to initialize you parser with.

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::smg::SmgParser::sync (   self)
\
For all connected players returned by self.getPlayerList(), get the matching Client
object from self.clients (with self.clients.getByCID(cid) or similar methods) and
look for inconsistencies. If required call the client.disconnect() method to remove
a client from self.clients.
This is mainly useful for games where clients are identified by the slot number they
occupy. On map change, a player A on slot 1 can leave making room for player B who
connects on slot 1.

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::smg::SmgParser::sync (   self)
\
For all connected players returned by self.getPlayerList(), get the matching Client
object from self.clients (with self.clients.getByCID(cid) or similar methods) and
look for inconsistencies. If required call the client.disconnect() method to remove
a client from self.clients.
This is mainly useful for games where clients are identified by the slot number they
occupy. On map change, a player A on slot 1 can leave making room for player B who
connects on slot 1.

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.


Member Data Documentation

dictionary b3::parsers::smg::SmgParser::_counter = {} [static, private]
string b3::parsers::smg::SmgParser::_empty_name_default = 'EmptyNameDefault' [static, private]
dictionary b3::parsers::smg::SmgParser::_eventMap [static, private]
Initial value:
{
        'warmup' : b3.events.EVT_GAME_WARMUP,
        'restartgame' : b3.events.EVT_GAME_ROUND_END
    }

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

tuple b3::parsers::smg::SmgParser::_lineClear = re.compile(r'^(?:[0-9:.]+\s?)?') [static, private]
Initial value:
(
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>(?P<cid>[0-9]+):\s*(?P<pbid>[0-9A-Z]{32}):\s*(?P<name>[^:]+):\s*(?P<num1>[0-9]+):\s*(?P<num2>[0-9]+):\s*(?P<ip>[0-9.]+):(?P<port>[0-9]+))$', re.IGNORECASE),
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>(?P<cid>[0-9]+):\s*(?P<name>.+):\s+(?P<text>.*))$', re.IGNORECASE),
        #
        #1536:37Kill: 1 18 9: ^1klaus killed ^1[pura]fox.nl by MOD_MP40
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>(?P<acid>[0-9]+)\s(?P<cid>[0-9]+)\s(?P<aweap>[0-9]+):\s*(?P<text>.*))$', re.IGNORECASE),
        #
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>(?P<cid>[0-9]+):\s*(?P<text>.*))$', re.IGNORECASE),
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>(?P<cid>[0-9]+)\s(?P<text>.*))$', re.IGNORECASE),
        #
        # Falling through?
        # 1:05 ClientConnect: 3
        # 1:05 ClientUserinfoChanged: 3 guid\CAB616192CB5652375401264987A23D0\n\xlr8or\t\0\model\wq_male2/red\g_redteam\\g_blueteam\\hc\100\w\0\l\0\tt\0\tl\0
        re.compile(r'^(?P<action>[a-z_]+):\s*(?P<data>.*)$', re.IGNORECASE)
    )

Reimplemented from b3::parsers::q3a::abstractParser::AbstractParser.

tuple b3::parsers::smg::SmgParser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [static, private]
tuple b3::parsers::smg::SmgParser::_regPlayer = re.compile(r'^(?P<slot>[0-9]+)\s+(?P<score>[0-9-]+)\s+(?P<ping>[0-9]+)\s+(?P<name>.*?)\s+(?P<last>[0-9]+)\s+(?P<ip>[0-9.]+):(?P<port>[0-9-]+)\s+(?P<qport>[0-9]+)\s+(?P<rate>[0-9]+)$', re.I) [static, private]
string b3::parsers::smg::SmgParser::MOD_LAVA = '16' [static]
string b3::parsers::smg::SmgParser::MOD_NAIL = '23' [static]

kill mode constants: modNames[meansOfDeath]

Initial value:
(
        MOD_WATER,
        MOD_SLIME,
        MOD_LAVA,
        MOD_CRUSH,
        MOD_TELEFRAG,
        MOD_FALLING,
        MOD_SUICIDE,
        MOD_TRIGGER_HURT,
        MOD_NAIL,
        MOD_CHAINGUN,
        MOD_PROXIMITY_MINE,
        MOD_BOILER
    )

meansOfDeath to be considered suicides


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Properties