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

b3::parsers::altitude::AltitudeParser Class Reference

Inheritance diagram for b3::parsers::altitude::AltitudeParser:
b3::parser::Parser b3::parser::Parser

List of all members.

Public Member Functions

def startup
def parseLine
def OnAltitudeServerInit
def OnAltitudeClientAdd
def OnAltitudeClientRemove
def OnAltitudeChat
def OnAltitudeKill
def OnAltitudeAssist
def OnAltitudeTeamChange
def OnAltitudeSpawn
def OnAltitudeRoundEnd
def OnAltitudeMapChange
def OnAltitudePowerupPickup
def OnAltitudePowerupAutoUse
def OnAltitudePowerupUse
def OnAltitudePowerupDefuse
def OnAltitudeGoal
def OnAltitudeStructureDamage
def OnAltitudeStructureDestroy
def OnAltitudePingSummary
def OnAltitudeConsoleCommandExecute
def OnAltitudeCommandVote
def OnAltitudeCommandCastBallot
def getPlayerList
def authorizeClients
def sync
def say
def saybig
def message
def kick
def ban
def unban
def tempban
def getMap
def getMaps
def rotateMap
def changeMap
def getPlayerPings
def getPlayerScores
def inflictCustomPenalty
def shutdown
def getTeam
def newClient
def startup
def parseLine
def OnAltitudeServerInit
def OnAltitudeClientAdd
def OnAltitudeClientRemove
def OnAltitudeChat
def OnAltitudeKill
def OnAltitudeAssist
def OnAltitudeTeamChange
def OnAltitudeSpawn
def OnAltitudeRoundEnd
def OnAltitudeMapChange
def OnAltitudePowerupPickup
def OnAltitudePowerupAutoUse
def OnAltitudePowerupUse
def OnAltitudePowerupDefuse
def OnAltitudeGoal
def OnAltitudeStructureDamage
def OnAltitudeStructureDestroy
def OnAltitudePingSummary
def OnAltitudeConsoleCommandExecute
def OnAltitudeCommandVote
def OnAltitudeCommandCastBallot
def getPlayerList
def authorizeClients
def sync
def say
def saybig
def message
def kick
def ban
def unban
def tempban
def getMap
def getMaps
def rotateMap
def changeMap
def getPlayerPings
def getPlayerScores
def inflictCustomPenalty
def shutdown
def getTeam
def newClient

Public Attributes

 output

Static Public Attributes

string gameName = 'altitude'
 parser code name to use in b3.xml

Private Member Functions

def _initialize_rcon
def _OnClientCallVote
def _initialize_rcon
def _OnClientCallVote

Private Attributes

 _last_endround_report
 don't know yet if saving _last_ping_report will be of any use...
 _last_ping_report

Static Private Attributes

tuple _lineTime = re.compile(r'^{"port":[0-9]+, "time":(?P<seconds>[0-9]+),.*')
 extract the time off a log line
dictionary _eventMap
 Direct event mapping between Altitude events type and B3 event types.
dictionary _last_ping_report = {}
dictionary _last_endround_report = {}

Detailed Description

B3 parser for the Altitude game. See http://altitudegame.com

Member Function Documentation

def b3::parsers::altitude::AltitudeParser::_initialize_rcon (   self) [private]
We need a way to send rcon commands to the gale server. In
Altitude, this is done by writing commands to be run on a new line
of the command.txt file
def b3::parsers::altitude::AltitudeParser::_initialize_rcon (   self) [private]
We need a way to send rcon commands to the gale server. In
Altitude, this is done by writing commands to be run on a new line
of the command.txt file
def b3::parsers::altitude::AltitudeParser::_OnClientCallVote (   self,
  b3event 
) [private]
This game allows anyone to call a kick vote agains an admin.
Here we keep an eye on every kick vote and if we found someone calling
a kick vote on a player of higher level, then we kick him 
example of altitude call vote event :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::_OnClientCallVote (   self,
  b3event 
) [private]
This game allows anyone to call a kick vote agains an admin.
Here we keep an eye on every kick vote and if we found someone calling
a kick vote on a player of higher level, then we kick him 
example of altitude call vote event :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::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.

def b3::parsers::altitude::AltitudeParser::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.

def b3::parsers::altitude::AltitudeParser::ban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
ban a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::ban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
ban a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::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::altitude::AltitudeParser::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::altitude::AltitudeParser::getMap (   self)
\
return the current map/level name

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::getMap (   self)
\
return the current map/level name

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::getPlayerList (   self)
\
Query the game server for connected players.
return a dict having players' id for keys and players' data as another dict for values

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::getPlayerList (   self)
\
Query the game server for connected players.
return a dict having players' id for keys and players' data as another dict for values

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::getTeam (   self,
  teamAltitudeId 
)
convert an Altitude team ID into a B3 team ID
doc: http://altitudegame.com/forums/showpost.php?p=82191&postcount=30
def b3::parsers::altitude::AltitudeParser::getTeam (   self,
  teamAltitudeId 
)
convert an Altitude team ID into a B3 team ID
doc: http://altitudegame.com/forums/showpost.php?p=82191&postcount=30
def b3::parsers::altitude::AltitudeParser::inflictCustomPenalty (   self,
  type,
  kwargs 
)
Called if b3.admin.penalizeClient() does not know a given penalty type. 
Overwrite this to add customized penalties for your game like 'slap', 'nuke', 
'mute' or anything you want.
/!\ This method must return True if the penalty was inflicted.
def b3::parsers::altitude::AltitudeParser::inflictCustomPenalty (   self,
  type,
  kwargs 
)
Called if b3.admin.penalizeClient() does not know a given penalty type. 
Overwrite this to add customized penalties for your game like 'slap', 'nuke', 
'mute' or anything you want.
/!\ This method must return True if the penalty was inflicted.
def b3::parsers::altitude::AltitudeParser::kick (   self,
  clientOrCid,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
kick a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::kick (   self,
  clientOrCid,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
kick a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::message (   self,
  client,
  msg 
)
\
display a message to a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::message (   self,
  client,
  msg 
)
\
display a message to a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::newClient (   self,
  cid,
  kwargs 
)
create a new client and initialize some Altitude specific 
attributes
def b3::parsers::altitude::AltitudeParser::newClient (   self,
  cid,
  kwargs 
)
create a new client and initialize some Altitude specific 
attributes
def b3::parsers::altitude::AltitudeParser::OnAltitudeAssist (   self,
  altitude_event 
)
handle log lines of type assist
example :
{u'player': 2, u'victim': 1, u'time': 10836645, u'xp': 8, u'type': u'assist', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeAssist (   self,
  altitude_event 
)
handle log lines of type assist
example :
{u'player': 2, u'victim': 1, u'time': 10836645, u'xp': 8, u'type': u'assist', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeChat (   self,
  altitude_event 
)
handle log lines of type clientRemove
example :
{"port":27276,"message":"test","time":326172,"player":2,"server":false,"type":"chat"}

Unfortunately, there is no distinction between a normal chat and team chat
{"port":27276,"message":"test team chat","time":1167491,"player":3,"server":false,"type":"chat"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeChat (   self,
  altitude_event 
)
handle log lines of type clientRemove
example :
{"port":27276,"message":"test","time":326172,"player":2,"server":false,"type":"chat"}

Unfortunately, there is no distinction between a normal chat and team chat
{"port":27276,"message":"test team chat","time":1167491,"player":3,"server":false,"type":"chat"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeClientAdd (   self,
  altitude_event 
)
handle log lines of type clientAdd
example :
{"port":27276,"demo":false,"time":12108767,"level":9,"player":2,"nickname":"Courgette","aceRank":0,"vaporId":"a8654321-123a-414e-c71a-123123123131","type":"clientAdd","ip":"192.168.10.1:27272"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeClientAdd (   self,
  altitude_event 
)
handle log lines of type clientAdd
example :
{"port":27276,"demo":false,"time":12108767,"level":9,"player":2,"nickname":"Courgette","aceRank":0,"vaporId":"a8654321-123a-414e-c71a-123123123131","type":"clientAdd","ip":"192.168.10.1:27272"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeClientRemove (   self,
  altitude_event 
)
handle log lines of type clientRemove
example :
    {"port":27276, "message":"left", "time":17317434, 
    "player":2, "reason":"Client left.", 
    "nickname":"Courgette", "vaporId":"d6545616-17a3-4044-a74b-121231321321",
    "type":"clientRemove", "ip":"192.168.10.1:27272"}
    
    {"port":27276, "message":"banned for 2 minutes", "time":3300620,
    "player":2, "reason":"Kicked by vote.", "nickname":"Courgette",
    "vaporId":"d6545616-17a3-4044-a74b-121231321321", "type":"clientRemove",
    "ip":"192.168.10.1:27272"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeClientRemove (   self,
  altitude_event 
)
handle log lines of type clientRemove
example :
    {"port":27276, "message":"left", "time":17317434, 
    "player":2, "reason":"Client left.", 
    "nickname":"Courgette", "vaporId":"d6545616-17a3-4044-a74b-121231321321",
    "type":"clientRemove", "ip":"192.168.10.1:27272"}
    
    {"port":27276, "message":"banned for 2 minutes", "time":3300620,
    "player":2, "reason":"Kicked by vote.", "nickname":"Courgette",
    "vaporId":"d6545616-17a3-4044-a74b-121231321321", "type":"clientRemove",
    "ip":"192.168.10.1:27272"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeCommandCastBallot (   self,
  altitude_event 
)
handle castBallot console commands
example :
    {"port":27276,"time":3252183, "arguments":["1"],
    "source":"86e487de-0190-43ff-8e9e-70a14a1751a2",
    "command":"castBallot", "group":"Anonymous",
    "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeCommandCastBallot (   self,
  altitude_event 
)
handle castBallot console commands
example :
    {"port":27276,"time":3252183, "arguments":["1"],
    "source":"86e487de-0190-43ff-8e9e-70a14a1751a2",
    "command":"castBallot", "group":"Anonymous",
    "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeCommandVote (   self,
  altitude_event 
)
handle vote console commands
example :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeCommandVote (   self,
  altitude_event 
)
handle vote console commands
example :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeConsoleCommandExecute (   self,
  altitude_event 
)
handle log lines of type consoleCommandExecute
example :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeConsoleCommandExecute (   self,
  altitude_event 
)
handle log lines of type consoleCommandExecute
example :
    {"port":27276, "time":3250286, "arguments":["kick","Courgette"],
    "source":"c0aaf37d-e56d-4431-aa1e-69d5e18be5e6", "command":"vote",
    "group":"Anonymous", "type":"consoleCommandExecute"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeGoal (   self,
  altitude_event 
)
handle log lines of type goal
example :
{"port":27276,"time":4927227,"player":1,"xp":50,"type":"goal","assister":-1}
def b3::parsers::altitude::AltitudeParser::OnAltitudeGoal (   self,
  altitude_event 
)
handle log lines of type goal
example :
{"port":27276,"time":4927227,"player":1,"xp":50,"type":"goal","assister":-1}
def b3::parsers::altitude::AltitudeParser::OnAltitudeKill (   self,
  altitude_event 
)
handle log lines of type kill
example :
{u'streak': 0, u'multi': 0, u'player': -1, u'source': u'plane', u'victim': 0, u'time': 3571497, u'xp': 10, u'type': u'kill', u'port': 27276}
NOTE: there is no team kill in that game
def b3::parsers::altitude::AltitudeParser::OnAltitudeKill (   self,
  altitude_event 
)
handle log lines of type kill
example :
{u'streak': 0, u'multi': 0, u'player': -1, u'source': u'plane', u'victim': 0, u'time': 3571497, u'xp': 10, u'type': u'kill', u'port': 27276}
NOTE: there is no team kill in that game
def b3::parsers::altitude::AltitudeParser::OnAltitudeMapChange (   self,
  altitude_event 
)
handle log lines of type mapChange
example :
{"port":27276,"time":4847790,"map":"ball_grotto","type":"mapChange","mode":"ball"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeMapChange (   self,
  altitude_event 
)
handle log lines of type mapChange
example :
{"port":27276,"time":4847790,"map":"ball_grotto","type":"mapChange","mode":"ball"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePingSummary (   self,
  altitude_event 
)
handle log lines of type pingSummary
example :
{u'pingByPlayer': {u'10': 138, u'7': 153, u'6': 0}, u'type': u'pingSummary', u'port': 27276, u'time': 4188098}
def b3::parsers::altitude::AltitudeParser::OnAltitudePingSummary (   self,
  altitude_event 
)
handle log lines of type pingSummary
example :
{u'pingByPlayer': {u'10': 138, u'7': 153, u'6': 0}, u'type': u'pingSummary', u'port': 27276, u'time': 4188098}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupAutoUse (   self,
  altitude_event 
)
handle log lines of type powerupAutoUse
example :
{"port":27276,"time":4551678,"powerup":"Health","player":10,"positionX":2898,"positionY":285,"type":"powerupAutoUse"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupAutoUse (   self,
  altitude_event 
)
handle log lines of type powerupAutoUse
example :
{"port":27276,"time":4551678,"powerup":"Health","player":10,"positionX":2898,"positionY":285,"type":"powerupAutoUse"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupDefuse (   self,
  altitude_event 
)
handle log lines of type powerupDefuse
example :
{u'positionX': 1416.9, u'powerup': u'Bomb', u'player': 2, u'positionY': 522.83, u'time': 12243874, u'xp': 10, u'type': u'powerupDefuse', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupDefuse (   self,
  altitude_event 
)
handle log lines of type powerupDefuse
example :
{u'positionX': 1416.9, u'powerup': u'Bomb', u'player': 2, u'positionY': 522.83, u'time': 12243874, u'xp': 10, u'type': u'powerupDefuse', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupPickup (   self,
  altitude_event 
)
handle log lines of type powerupPickup
example :
{"port":27276,"time":4549268,"powerup":"Homing Missile","player":10,"positionX":3572.41,"positionY":639.57,"type":"powerupPickup"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupPickup (   self,
  altitude_event 
)
handle log lines of type powerupPickup
example :
{"port":27276,"time":4549268,"powerup":"Homing Missile","player":10,"positionX":3572.41,"positionY":639.57,"type":"powerupPickup"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupUse (   self,
  altitude_event 
)
handle log lines of type powerupUse
example :
{"port":27276,"velocityX":-8.62,"time":5166541,"powerup":"Homing Missile","player":0,"positionX":2060.43,"velocityY":0.75,"positionY":726.69,"type":"powerupUse"}
def b3::parsers::altitude::AltitudeParser::OnAltitudePowerupUse (   self,
  altitude_event 
)
handle log lines of type powerupUse
example :
{"port":27276,"velocityX":-8.62,"time":5166541,"powerup":"Homing Missile","player":0,"positionX":2060.43,"velocityY":0.75,"positionY":726.69,"type":"powerupUse"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeRoundEnd (   self,
  altitude_event 
)
handle log lines of type roundEnd
example :
{"port":27276,"time":4833834,"participantStatsByName":{"Crashes":[2,4,0,0,0],"Goals Scored":[0,0,0,0,0],"Kills":[22,12,2,0,31],"Damage Received":[1680,4090,100,2570,1540],"Assists":[8,0,1,1,4],"Multikill":[2,0,0,0,2],"Ball Possession Time":[0,0,0,0,0],"Experience":[267,190,24,12,346],"Longest Life":[207,46,61,41,307],"Goals Assisted":[0,0,0,0,0],"Damage Dealt to Enemy Buildings":[0,0,0,0,0],"Deaths":[8,35,0,24,6],"Damage Dealt":[1950,1170,80,250,2540],"Kill Streak":[14,3,2,0,21]},"winnerByAward":{"Best Multikill":0,"Longest Life":10,"Best Kill Streak":10,"Most Deadly":10,"Most Helpful":0},"type":"roundEnd","participants":[0,1,2,7,10]}
def b3::parsers::altitude::AltitudeParser::OnAltitudeRoundEnd (   self,
  altitude_event 
)
handle log lines of type roundEnd
example :
{"port":27276,"time":4833834,"participantStatsByName":{"Crashes":[2,4,0,0,0],"Goals Scored":[0,0,0,0,0],"Kills":[22,12,2,0,31],"Damage Received":[1680,4090,100,2570,1540],"Assists":[8,0,1,1,4],"Multikill":[2,0,0,0,2],"Ball Possession Time":[0,0,0,0,0],"Experience":[267,190,24,12,346],"Longest Life":[207,46,61,41,307],"Goals Assisted":[0,0,0,0,0],"Damage Dealt to Enemy Buildings":[0,0,0,0,0],"Deaths":[8,35,0,24,6],"Damage Dealt":[1950,1170,80,250,2540],"Kill Streak":[14,3,2,0,21]},"winnerByAward":{"Best Multikill":0,"Longest Life":10,"Best Kill Streak":10,"Most Deadly":10,"Most Helpful":0},"type":"roundEnd","participants":[0,1,2,7,10]}
def b3::parsers::altitude::AltitudeParser::OnAltitudeServerInit (   self,
  altitude_event 
)
handle log lines of type serverInit
example :
{'maxPlayerCount': 14, 
'type': 'serverInit', 'port': 27276, 
'name': u'Courgette test Server', 'time': 493}
def b3::parsers::altitude::AltitudeParser::OnAltitudeServerInit (   self,
  altitude_event 
)
handle log lines of type serverInit
example :
{'maxPlayerCount': 14, 
'type': 'serverInit', 'port': 27276, 
'name': u'Courgette test Server', 'time': 493}
def b3::parsers::altitude::AltitudeParser::OnAltitudeSpawn (   self,
  altitude_event 
)
handle log lines of type spawn
example :
{u'perkBlue': u'Reverse Thrust', u'team': 8, u'perkGreen': u'Heavy Armor', u'player': 1, u'plane': u'Biplane', u'perkRed': u'Heavy Cannon', u'time': 4454401, u'skin': u'No Skin', u'type': u'spawn', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeSpawn (   self,
  altitude_event 
)
handle log lines of type spawn
example :
{u'perkBlue': u'Reverse Thrust', u'team': 8, u'perkGreen': u'Heavy Armor', u'player': 1, u'plane': u'Biplane', u'perkRed': u'Heavy Cannon', u'time': 4454401, u'skin': u'No Skin', u'type': u'spawn', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeStructureDamage (   self,
  altitude_event 
)
handle log lines of type structureDamage
example :
{u'target': u'base', u'player': 3, u'time': 11048551, u'xp': 31, u'type': u'structureDamage', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeStructureDamage (   self,
  altitude_event 
)
handle log lines of type structureDamage
example :
{u'target': u'base', u'player': 3, u'time': 11048551, u'xp': 31, u'type': u'structureDamage', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeStructureDestroy (   self,
  altitude_event 
)
handle log lines of type structureDestroy
example :
{u'target': u'turret', u'player': 3, u'time': 13534409, u'xp': 10, u'type': u'structureDestroy', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeStructureDestroy (   self,
  altitude_event 
)
handle log lines of type structureDestroy
example :
{u'target': u'turret', u'player': 3, u'time': 13534409, u'xp': 10, u'type': u'structureDestroy', u'port': 27276}
def b3::parsers::altitude::AltitudeParser::OnAltitudeTeamChange (   self,
  altitude_event 
)
handle log lines of type teamChange
example :
{"port":27276,"time":4768143,"player":2,"team":2,"type":"teamChange"}
def b3::parsers::altitude::AltitudeParser::OnAltitudeTeamChange (   self,
  altitude_event 
)
handle log lines of type teamChange
example :
{"port":27276,"time":4768143,"player":2,"team":2,"type":"teamChange"}
def b3::parsers::altitude::AltitudeParser::parseLine (   self,
  line 
)
method call for each line of the game log file that must return
a B3 event
Examples of log lines :
{"port":27276,"time":103197,"name":"Courgette test Server","type":"serverInit","maxPlayerCount":14}
{"port":27276,"time":103344,"map":"ball_cave","type":"mapLoading"}
{"port":27276,"time":103682,"type":"serverStart"}
{"port":27276,"demo":false,"time":103691,"level":1,"player":0,"nickname":"Bot 1","aceRank":0,"vaporId":"00000000-0000-0000-0000-000000000000","type":"clientAdd","ip":"0.0.0.0:100001"}
{"port":27276,"demo":false,"time":12108767,"level":9,"player":2,"nickname":"Courgette","aceRank":0,"vaporId":"d8123456-18a4-124e-a45b-155641685161","type":"clientAdd","ip":"192.168.10.1:27272"}
{"port":27276,"time":12110927,"type":"pingSummary","pingByPlayer":{"2":0}}
{"port":27276,"time":12123445,"player":2,"team":2,"type":"teamChange"}
{"port":27276,"time":12124957,"plane":"Loopy","player":1,"perkRed":"Tracker","perkGreen":"Rubberized Hull","team":4,"type":"spawn","perkBlue":"Turbocharger","skin":"Flame Skin"}
{"port":27276,"time":15048305,"streak":0,"source":"turret","player":-1,"victim":1,"multi":0,"xp":10,"type":"kill"}

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::parseLine (   self,
  line 
)
method call for each line of the game log file that must return
a B3 event
Examples of log lines :
{"port":27276,"time":103197,"name":"Courgette test Server","type":"serverInit","maxPlayerCount":14}
{"port":27276,"time":103344,"map":"ball_cave","type":"mapLoading"}
{"port":27276,"time":103682,"type":"serverStart"}
{"port":27276,"demo":false,"time":103691,"level":1,"player":0,"nickname":"Bot 1","aceRank":0,"vaporId":"00000000-0000-0000-0000-000000000000","type":"clientAdd","ip":"0.0.0.0:100001"}
{"port":27276,"demo":false,"time":12108767,"level":9,"player":2,"nickname":"Courgette","aceRank":0,"vaporId":"d8123456-18a4-124e-a45b-155641685161","type":"clientAdd","ip":"192.168.10.1:27272"}
{"port":27276,"time":12110927,"type":"pingSummary","pingByPlayer":{"2":0}}
{"port":27276,"time":12123445,"player":2,"team":2,"type":"teamChange"}
{"port":27276,"time":12124957,"plane":"Loopy","player":1,"perkRed":"Tracker","perkGreen":"Rubberized Hull","team":4,"type":"spawn","perkBlue":"Turbocharger","skin":"Flame Skin"}
{"port":27276,"time":15048305,"streak":0,"source":"turret","player":-1,"victim":1,"multi":0,"xp":10,"type":"kill"}

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::rotateMap (   self)
\
load the next map/level

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::rotateMap (   self)
\
load the next map/level

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::say (   self,
  msg 
)
\
broadcast a message to all players

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::say (   self,
  msg 
)
\
broadcast a message to all players

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::shutdown (   self)
Shutdown B3

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::shutdown (   self)
Shutdown B3

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

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

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::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.

def b3::parsers::altitude::AltitudeParser::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.

def b3::parsers::altitude::AltitudeParser::tempban (   self,
  client,
  reason = '',
  duration = 2,
  admin = None,
  silent = False,
  kwargs 
)
\
tempban a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::tempban (   self,
  client,
  reason = '',
  duration = 2,
  admin = None,
  silent = False,
  kwargs 
)
\
tempban a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
unban a given player

Reimplemented from b3::parser::Parser.

def b3::parsers::altitude::AltitudeParser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
unban a given player

Reimplemented from b3::parser::Parser.


Member Data Documentation

Initial value:
{
        'serverStart' : EVT_CUSTOM,
        'mapLoading' : EVT_CUSTOM,
    }

Direct event mapping between Altitude events type and B3 event types.

B3 event will be created with their data parameter set to the full altitude event object

don't know yet if saving _last_ping_report will be of any use...

tuple b3::parsers::altitude::AltitudeParser::_lineTime = re.compile(r'^{"port":[0-9]+, "time":(?P<seconds>[0-9]+),.*') [static, private]

extract the time off a log line

parser code name to use in b3.xml

Reimplemented from b3::parser::Parser.


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