BigBrotherBot v1.5.0
System Development Information for the BigBrotherBot project.
Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes

b3::parsers::smg11::Smg11Parser Class Reference

Inheritance diagram for b3::parsers::smg11::Smg11Parser:
b3::parsers::q3a::abstractParser::AbstractParser b3::parser::Parser

List of all members.

Public Member Functions

def startup
def getLineParts
def OnClientconnect
def OnClientuserinfochanged
def OnKill
def OnClientdisconnect
def OnInitgame
def OnSayteam
def OnItem
def OnDamage
def parseUserInfo
def getTeam
def defineGameType
def getMaps
def getNextMap
def findNextMap
def sync
def connectClient
def getByCidOrJoinPlayer
def queryClientUserInfoByCid

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

list _connectingSlots = []
 _maplist = None
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.]+)\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::smg11::Smg11Parser::connectClient (   self,
  ccid 
)
def b3::parsers::smg11::Smg11Parser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::smg11::Smg11Parser::findNextMap (   self,
  data 
)
def b3::parsers::smg11::Smg11Parser::getByCidOrJoinPlayer (   self,
  cid 
)
def b3::parsers::smg11::Smg11Parser::getLineParts (   self,
  line 
)
def b3::parsers::smg11::Smg11Parser::getMaps (   self)
\
return the available maps/levels name

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

def b3::parsers::smg11::Smg11Parser::getNextMap (   self)
def b3::parsers::smg11::Smg11Parser::getTeam (   self,
  team 
)
def b3::parsers::smg11::Smg11Parser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnDamage (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnKill (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::smg11::Smg11Parser::parseUserInfo (   self,
  info 
)
def b3::parsers::smg11::Smg11Parser::queryClientUserInfoByCid (   self,
  cid 
)
: dumpuser 5
Player 5 is not on the server

       : dumpuser 0
userinfo
--------
name                Courgette
ip                  11.222.111.33
rate                25000
snaps               20
model               wq_male3/red
handicap            100
sex                 male
cg_predictItems     1
team_model          wq_male1
cl_voip             1
cg_cmdTimeNudge     0
cg_delag            1
g_blueTeam          Outlaws
g_redTeam           Lawmen
team_headmodel      *james
headmodel           sarge
teamtask            0
cl_version          1.1b4 20100116
cl_md5              9F1646464ADFA64A654A6546546465E9
sa_engine_check1    7B135FE5ACACACACAAC4656546546543
cl_guid             0F4E000FFF0FFC00000ACCDE0000FF8A
ui_singlePlayerActive0
sa_engine_in_use    1
teamoverlay         1
cg_debugDelag       0
cg_latentSnaps      0
cg_latentCmds       0
cg_plOut            0

def b3::parsers::smg11::Smg11Parser::startup (   self)
\
Depreciated. Use onStartup().

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

def b3::parsers::smg11::Smg11Parser::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::smg11::Smg11Parser::_commands = {} [static, private]
string b3::parsers::smg11::Smg11Parser::_empty_name_default = 'EmptyNameDefault' [static, private]
dictionary b3::parsers::smg11::Smg11Parser::_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::smg11::Smg11Parser::_lineClear = re.compile(r'^(?:[0-9:.]+\s?)?') [static, private]
Initial value:
(
        #468950: client:0 health:90 damage:21.6 where:arm from:MOD_SCHOFIELD by:2
        re.compile(r'^\d+:\s+(?P<data>client:(?P<cid>\d+)\s+health:(?P<health>\d+)\s+damage:(?P<damage>[.\d]+)\s+where:(?P<hitloc>[^\s]+)\s+from:(?P<aweap>[^\s]+)\s+by:(?P<acid>\d+))$', re.IGNORECASE),
        
        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::smg11::Smg11Parser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [static, private]
tuple b3::parsers::smg11::Smg11Parser::_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.]+)\s+(?P<qport>[0-9]+)\s+(?P<rate>[0-9]+)$', re.I) [static, private]
dictionary b3::parsers::smg11::Smg11Parser::_settings = {} [static, private]

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 file:
 All Classes Namespaces Files Functions Variables Properties