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

b3::parsers::q3a::abstractParser::AbstractParser Class Reference

Inheritance diagram for b3::parsers::q3a::abstractParser::AbstractParser:
b3::parser::Parser b3::parser::Parser b3::parsers::cod::CodParser b3::parsers::cod::CodParser b3::parsers::et::EtParser b3::parsers::et::EtParser b3::parsers::etpro::EtproParser b3::parsers::etpro::EtproParser b3::parsers::iourt41::Iourt41Parser b3::parsers::iourt41::Iourt41Parser b3::parsers::oa081::Oa081Parser b3::parsers::oa081::Oa081Parser b3::parsers::smg11::Smg11Parser b3::parsers::smg11::Smg11Parser b3::parsers::smg::SmgParser b3::parsers::smg::SmgParser b3::parsers::sof2::Sof2Parser b3::parsers::sof2::Sof2Parser b3::parsers::wop15::Wop15Parser b3::parsers::wop15::Wop15Parser b3::parsers::wop::WopParser b3::parsers::wop::WopParser

List of all members.

Public Member Functions

def startup
def getLineParts
def parseLine
def getClient
def OnSay
def OnShutdowngame
def OnClientdisconnect
def OnSayteam
def OnExit
def OnItem
def OnClientbegin
def OnClientconnect
def OnClientuserinfo
def OnClientuserinfochanged
def OnUserinfo
def OnKill
def OnInitgame
def parseUserInfo
def getTeam
def message
def say
def saybig
def smartSay
def sayDead
def kick
def ban
def unban
def tempban
def rotateMap
def changeMap
def getPlayerPings
def getPlayerScores
def getPlayerScoressssss
def getPlayerList
def getCvar
def set
def setCvar
def getMap
def getMaps
def sync
def authorizeClients
def startup
def getLineParts
def parseLine
def getClient
def OnSay
def OnShutdowngame
def OnClientdisconnect
def OnSayteam
def OnExit
def OnItem
def OnClientbegin
def OnClientconnect
def OnClientuserinfo
def OnClientuserinfochanged
def OnUserinfo
def OnKill
def OnInitgame
def parseUserInfo
def getTeam
def message
def say
def saybig
def smartSay
def sayDead
def kick
def ban
def unban
def tempban
def rotateMap
def changeMap
def getPlayerPings
def getPlayerScores
def getPlayerScoressssss
def getPlayerList
def getCvar
def set
def setCvar
def getMap
def getMaps
def sync
def authorizeClients

Static Public Attributes

 gameName = None
 privateMsg = True
 rconTest = True
 OutputClass = rcon.Rcon
 PunkBuster = None

Private Attributes

 _clientConnectID

Static Private Attributes

dictionary _settings = {}
dictionary _commands = {}
dictionary _eventMap
tuple _lineClear = re.compile(r'^(?:[0-9:]+\s?)?')
tuple _lineTime = re.compile(r'^(?P<minutes>[0-9]+):(?P<seconds>[0-9]+).*')
tuple _lineFormats
tuple _regPlayer = re.compile(r'^(?P<slot>[0-9]+)\s+(?P<score>[0-9-]+)\s+(?P<ping>[0-9]+)\s+(?P<guid>[0-9a-zA-Z]+)\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 _regPlayerShort = re.compile(r'\s+(?P<slot>[0-9]+)\s+(?P<score>[0-9]+)\s+(?P<ping>[0-9]+)\s+(?P<name>.*)\^7\s+', re.I)
tuple _reColor = re.compile(r'(\^[0-9a-z])|[\x80-\xff]')
tuple _reCvarName = re.compile(r'^[a-z0-9_.]+$', re.I)
tuple _reCvar
tuple _reMapNameFromStatus = re.compile(r'^map:\s+(?P<map>.+)$', re.I)

Detailed Description

An abstract base class to help with developing q3a parsers 

Member Function Documentation

def b3::parsers::q3a::abstractParser::AbstractParser::authorizeClients (   self)
\
For all connected players, fill the client object with properties allowing to find 
the user in the database (usualy guid, or punkbuster id, ip) and call the 
Client.auth() method 

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod::CodParser, and b3::parsers::cod4::Cod4Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::authorizeClients (   self)
\
For all connected players, fill the client object with properties allowing to find 
the user in the database (usualy guid, or punkbuster id, ip) and call the 
Client.auth() method 

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod::CodParser, and b3::parsers::cod4::Cod4Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::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::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::iourt41::Iourt41Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::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::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::iourt41::Iourt41Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::changeMap (   self,
  map 
)
\
load a given map/level
return a list of suggested map names in cases it fails to recognize the map that was provided

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::changeMap (   self,
  map 
)
\
load a given map/level
return a list of suggested map names in cases it fails to recognize the map that was provided

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getClient (   self,
  match = None,
  attacker = None,
  victim = None 
)
Get a client object using the best availible data
def b3::parsers::q3a::abstractParser::AbstractParser::getClient (   self,
  match = None,
  attacker = None,
  victim = None 
)
Get a client object using the best availible data
def b3::parsers::q3a::abstractParser::AbstractParser::getCvar (   self,
  cvarName 
)
def b3::parsers::q3a::abstractParser::AbstractParser::getCvar (   self,
  cvarName 
)
def b3::parsers::q3a::abstractParser::AbstractParser::getMap (   self)
\
return the current map/level name

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getMap (   self)
\
return the current map/level name

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerList (   self,
  maxRetries = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerList (   self,
  maxRetries = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerPings (   self)
\
returns a dict having players' id for keys and players' ping for values

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::iourt41::Iourt41Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerPings (   self)
\
returns a dict having players' id for keys and players' ping for values

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::iourt41::Iourt41Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerScores (   self)
\
returns a dict having players' id for keys and players' scores for values

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerScores (   self)
\
returns a dict having players' id for keys and players' scores for values

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerScoressssss (   self)
def b3::parsers::q3a::abstractParser::AbstractParser::getPlayerScoressssss (   self)
def b3::parsers::q3a::abstractParser::AbstractParser::kick (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
kick a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::kick (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
kick a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::message (   self,
  client,
  text 
)
def b3::parsers::q3a::abstractParser::AbstractParser::message (   self,
  client,
  text 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnClientbegin (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnClientbegin (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnExit (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnExit (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnSay (   self,
  action,
  data,
  match = None 
)
\
if self.type == b3.COMMAND:
    # we really need the second line
    text = self.read()
    if text:
msg = string.split(text[:-1], '^7: ', 1)
if not len(msg) == 2:
    return None
else:

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::sof2::Sof2Parser, b3::parsers::wop::WopParser, b3::parsers::wop15::Wop15Parser, b3::parsers::cod::CodParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::sof2::Sof2Parser, b3::parsers::wop::WopParser, and b3::parsers::wop15::Wop15Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::OnSay (   self,
  action,
  data,
  match = None 
)
\
if self.type == b3.COMMAND:
    # we really need the second line
    text = self.read()
    if text:
msg = string.split(text[:-1], '^7: ', 1)
if not len(msg) == 2:
    return None
else:

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::sof2::Sof2Parser, b3::parsers::wop::WopParser, b3::parsers::wop15::Wop15Parser, b3::parsers::cod::CodParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::sof2::Sof2Parser, b3::parsers::wop::WopParser, and b3::parsers::wop15::Wop15Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::OnShutdowngame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnShutdowngame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnUserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::OnUserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::q3a::abstractParser::AbstractParser::parseLine (   self,
  line 
)
def b3::parsers::q3a::abstractParser::AbstractParser::parseLine (   self,
  line 
)
def b3::parsers::q3a::abstractParser::AbstractParser::rotateMap (   self)
\
load the next map/level

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::oa081::Oa081Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::rotateMap (   self)
\
load the next map/level

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::oa081::Oa081Parser, and b3::parsers::oa081::Oa081Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::say (   self,
  msg 
)
\
broadcast a message to all players

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::wop15::Wop15Parser, and b3::parsers::wop15::Wop15Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::say (   self,
  msg 
)
\
broadcast a message to all players

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::wop15::Wop15Parser, and b3::parsers::wop15::Wop15Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::saybig (   self,
  msg 
)
\
broadcast a message to all players in a way that will catch their attention.

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, and b3::parsers::iourt41::Iourt41Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::saybig (   self,
  msg 
)
\
broadcast a message to all players in a way that will catch their attention.

Reimplemented from b3::parser::Parser.

Reimplemented in b3::parsers::iourt41::Iourt41Parser, and b3::parsers::iourt41::Iourt41Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::sayDead (   self,
  msg 
)
def b3::parsers::q3a::abstractParser::AbstractParser::sayDead (   self,
  msg 
)
def b3::parsers::q3a::abstractParser::AbstractParser::set (   self,
  cvarName,
  value 
)
def b3::parsers::q3a::abstractParser::AbstractParser::set (   self,
  cvarName,
  value 
)
def b3::parsers::q3a::abstractParser::AbstractParser::setCvar (   self,
  cvarName,
  value 
)
def b3::parsers::q3a::abstractParser::AbstractParser::setCvar (   self,
  cvarName,
  value 
)
def b3::parsers::q3a::abstractParser::AbstractParser::smartSay (   self,
  client,
  msg 
)
def b3::parsers::q3a::abstractParser::AbstractParser::smartSay (   self,
  client,
  msg 
)
def b3::parsers::q3a::abstractParser::AbstractParser::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::parser::Parser.

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod5::Cod5Parser, b3::parsers::etpro::EtproParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::smg::SmgParser, b3::parsers::smg11::Smg11Parser, b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod5::Cod5Parser, b3::parsers::etpro::EtproParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::smg::SmgParser, and b3::parsers::smg11::Smg11Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::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::parser::Parser.

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod5::Cod5Parser, b3::parsers::etpro::EtproParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::smg::SmgParser, b3::parsers::smg11::Smg11Parser, b3::parsers::cod::CodParser, b3::parsers::cod4::Cod4Parser, b3::parsers::cod5::Cod5Parser, b3::parsers::etpro::EtproParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::smg::SmgParser, and b3::parsers::smg11::Smg11Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::tempban (   self,
  client,
  reason = '',
  duration = 2,
  admin = None,
  silent = False,
  kwargs 
)
\
tempban a given player on the game server and in case of success
fire the event ('EVT_CLIENT_BAN_TEMP', data={'reason': reason, 
'duration': duration, 'admin': admin}, client=target)

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::tempban (   self,
  client,
  reason = '',
  duration = 2,
  admin = None,
  silent = False,
  kwargs 
)
\
tempban a given player on the game server and in case of success
fire the event ('EVT_CLIENT_BAN_TEMP', data={'reason': reason, 
'duration': duration, 'admin': admin}, client=target)

Reimplemented from b3::parser::Parser.

def b3::parsers::q3a::abstractParser::AbstractParser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
def b3::parsers::q3a::abstractParser::AbstractParser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)

Member Data Documentation

Initial value:
(
        #1579:03ConnectInfo: 0: E24F9B2702B9E4A1223E905BF597FA92: ^w[^2AS^w]^2Lead: 3: 3: 24.153.180.106:2794
        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),
        #1536:17sayc: 0: ^w[^2AS^w]^2Lead:  sorry...
        #1536:34sayteamc: 17: ^1[^7DP^1]^4Timekiller: ^4ammo ^2here !!!!!
        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<cid>[0-9]+)\s(?P<acid>[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),
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>.*)$', re.IGNORECASE)
    )

Reimplemented in b3::parsers::cod::CodParser, b3::parsers::et::EtParser, b3::parsers::etpro::EtproParser, b3::parsers::iourt41::Iourt41Parser, b3::parsers::oa081::Oa081Parser, b3::parsers::smg::SmgParser, b3::parsers::smg11::Smg11Parser, b3::parsers::sof2::Sof2Parser, b3::parsers::wop::WopParser, and b3::parsers::wop15::Wop15Parser.

tuple b3::parsers::q3a::abstractParser::AbstractParser::_lineTime = re.compile(r'^(?P<minutes>[0-9]+):(?P<seconds>[0-9]+).*') [static, private]
Initial value:
(
        #"sv_maxclients" is:"16^7" default:"8^7"
        #latched: "12"
        re.compile(r'^"(?P<cvar>[a-z0-9_.]+)"\s+is:\s*"(?P<value>.*?)(\^7)?"\s+default:\s*"(?P<default>.*?)(\^7)?"$', re.I | re.M),
        #"g_maxGameClients" is:"0^7", the default
        #latched: "1"
        re.compile(r'^"(?P<cvar>[a-z0-9_.]+)"\s+is:\s*"(?P<default>(?P<value>.*?))(\^7)?",\s+the\sdefault$', re.I | re.M),
        #"mapname" is:"ut4_abbey^7"
        re.compile(r'^"(?P<cvar>[a-z0-9_.]+)"\s+is:\s*"(?P<value>.*?)(\^7)?"$', re.I | re.M),
    )
tuple b3::parsers::q3a::abstractParser::AbstractParser::_reCvarName = re.compile(r'^[a-z0-9_.]+$', re.I) [static, private]
tuple b3::parsers::q3a::abstractParser::AbstractParser::_regPlayer = re.compile(r'^(?P<slot>[0-9]+)\s+(?P<score>[0-9-]+)\s+(?P<ping>[0-9]+)\s+(?P<guid>[0-9a-zA-Z]+)\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]
tuple b3::parsers::q3a::abstractParser::AbstractParser::_regPlayerShort = re.compile(r'\s+(?P<slot>[0-9]+)\s+(?P<score>[0-9]+)\s+(?P<ping>[0-9]+)\s+(?P<name>.*)\^7\s+', re.I) [static, private]
tuple b3::parsers::q3a::abstractParser::AbstractParser::_reMapNameFromStatus = re.compile(r'^map:\s+(?P<map>.+)$', re.I) [static, private]

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