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

b3::parsers::oa081::Oa081Parser Class Reference

Inheritance diagram for b3::parsers::oa081::Oa081Parser:
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 OnTell
def OnAction
def OnItem
def OnCtf
def OnAward
def parseUserInfo
def getTeam
def defineGameType
def getMaps
def getNextMap
def findNextMap
def rotateMap
def ban
def unban
def getPlayerPings
def sync
def connectClient
def getByCidOrJoinPlayer
def queryClientUserInfoByCid

Static Public Attributes

string gameName = 'oa081'
 PunkBuster = None
int MOD_UNKNOWN = 0
 means of death ===========================================================================
int MOD_SHOTGUN = 1
int MOD_GAUNTLET = 2
int MOD_MACHINEGUN = 3
int MOD_GRENADE = 4
int MOD_GRENADE_SPLASH = 5
int MOD_ROCKET = 6
int MOD_ROCKET_SPLASH = 7
int MOD_PLASMA = 8
int MOD_PLASMA_SPLASH = 9
int MOD_RAILGUN = 10
int MOD_LIGHTNING = 11
int MOD_BFG = 12
int MOD_BFG_SPLASH = 13
int MOD_WATER = 14
int MOD_SLIME = 15
int MOD_LAVA = 16
int MOD_CRUSH = 17
int MOD_TELEFRAG = 18
int MOD_FALLING = 19
int MOD_SUICIDE = 20
int MOD_TARGET_LASER = 21
int MOD_TRIGGER_HURT = 22
int MOD_NAIL = 23
int MOD_CHAINGUN = 24
int MOD_PROXIMITY_MINE = 25
int MOD_KAMIKAZE = 26
int MOD_JUICED = 27
int MOD_GRAPPLE = 28
tuple Suicides
 meansOfDeath to be considered suicides

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]')
tuple _reTeamScores = re.compile(r'^red:(?P<RedScore>.+)\s+blue:(?P<BlueScore>.+)$', re.I)
tuple _rePlayerScore = re.compile(r'^score:\s+(?P<score>[0-9]+)\s+ping:\s+(?P<ping>[0-9]+|CNCT|ZMBI)\s+client:\s+(?P<slot>[0-9]+)\s+(?P<name>.*)$', re.I)
tuple _reBanList = re.compile(r'^Ban #(?P<cid>[0-9]+):\s+(?P<ip>[0-9]+.[0-9]+.[0-9]+.[0-9]+)/(?P<range>[0-9]+)$', re.I)

Member Function Documentation

def b3::parsers::oa081::Oa081Parser::ban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
ban a given player on the game server and in case of success
fire the event ('EVT_CLIENT_BAN', data={'reason': reason, 
'admin': admin}, client=target)

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

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

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

def b3::parsers::oa081::Oa081Parser::getNextMap (   self)
def b3::parsers::oa081::Oa081Parser::getPlayerPings (   self)
\
returns a dict having players' id for keys and players' ping for values

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

def b3::parsers::oa081::Oa081Parser::getTeam (   self,
  team 
)
def b3::parsers::oa081::Oa081Parser::OnAction (   self,
  cid,
  actiontype,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnAward (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnCtf (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnKill (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::OnTell (   self,
  action,
  data,
  match = None 
)
def b3::parsers::oa081::Oa081Parser::parseUserInfo (   self,
  info 
)
def b3::parsers::oa081::Oa081Parser::queryClientUserInfoByCid (   self,
  cid 
)
: dumpuser 5
Player 5 is not on the server

]\rcon dumpuser 0
userinfo
--------
ip                  81.56.143.41
cg_cmdTimeNudge     0
cg_delag            0
cg_scorePlums       1
cl_voip             0
cg_predictItems     1
cl_anonymous        0
sex                 male
handicap            100
color2              7
color1              2
team_headmodel      sarge/classic
team_model          sarge/classic
headmodel           sarge/classic
model               sarge/classic
snaps               20
rate                25000
name                Courgette
teamtask            0
cl_guid             201AB4BBC40B4EC7445B49CE82D209EC
teamoverlay         0
def b3::parsers::oa081::Oa081Parser::rotateMap (   self)
\
load the next map/level

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

def b3::parsers::oa081::Oa081Parser::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::oa081::Oa081Parser::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::oa081::Oa081Parser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
unban a given player on the game server

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


Member Data Documentation

string b3::parsers::oa081::Oa081Parser::_empty_name_default = 'EmptyNameDefault' [static, private]
dictionary b3::parsers::oa081::Oa081Parser::_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::oa081::Oa081Parser::_lineClear = re.compile(r'^(?:[0-9:.]+\s?)?') [static, private]
tuple b3::parsers::oa081::Oa081Parser::_reBanList = re.compile(r'^Ban #(?P<cid>[0-9]+):\s+(?P<ip>[0-9]+.[0-9]+.[0-9]+.[0-9]+)/(?P<range>[0-9]+)$', re.I) [static, private]
tuple b3::parsers::oa081::Oa081Parser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [static, private]
tuple b3::parsers::oa081::Oa081Parser::_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]
tuple b3::parsers::oa081::Oa081Parser::_rePlayerScore = re.compile(r'^score:\s+(?P<score>[0-9]+)\s+ping:\s+(?P<ping>[0-9]+|CNCT|ZMBI)\s+client:\s+(?P<slot>[0-9]+)\s+(?P<name>.*)$', re.I) [static, private]
tuple b3::parsers::oa081::Oa081Parser::_reTeamScores = re.compile(r'^red:(?P<RedScore>.+)\s+blue:(?P<BlueScore>.+)$', re.I) [static, private]

means of death ===========================================================================

Initial value:
(
        MOD_WATER,
        MOD_SLIME,
        MOD_LAVA,
        MOD_CRUSH,
        MOD_FALLING,
        MOD_SUICIDE,
        MOD_TRIGGER_HURT,
    )

meansOfDeath to be considered suicides


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