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

b3::parsers::wop::WopParser Class Reference

Inheritance diagram for b3::parsers::wop::WopParser:
b3::parsers::q3a::abstractParser::AbstractParser b3::parser::Parser

List of all members.

Public Member Functions

def startup
def getLineParts
def parseUserInfo
def OnClientconnect
def OnClientuserinfochanged
def OnClientdisconnect
def OnInitgame
def OnSay
def OnSayteam
def OnKill
def OnItem
def defineGameType

Static Public Attributes

string gameName = 'wop'
 privateMsg = False
 PunkBuster = None
string MOD_UNKNOWN = '0'
string MOD_SHOTGUN = '1'
string MOD_GAUNTLET = '2'
string MOD_MACHINEGUN = '3'
string MOD_GRENADE = '4'
string MOD_GRENADE_SPLASH = '5'
string MOD_ROCKET = '6'
string MOD_ROCKET_SPLASH = '7'
string MOD_PLASMA = '8'
string MOD_PLASMA_SPLASH = '9'
string MOD_RAILGUN = '10'
string MOD_LIGHTNING = '11'
string MOD_BFG = '12'
string MOD_BFG_SPLASH = '13'
string MOD_KILLERDUCKS = '14'
string MOD_WATER = '15'
string MOD_SLIME = '16'
string MOD_LAVA = '17'
string MOD_CRUSH = '18'
string MOD_TELEFRAG = '19'
string MOD_FALLING = '20'
string MOD_SUICIDE = '21'
string MOD_TARGET_LASER = '22'
string MOD_TRIGGER_HURT = '23'
string MOD_GRAPPLE = '24'

Private Attributes

 _clientConnectID
 _clientConnectGuid
 _clientConnectIp

Static Private Attributes

dictionary _settings = {}
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::wop::WopParser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::wop::WopParser::getLineParts (   self,
  line 
)
def b3::parsers::wop::WopParser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::OnKill (   self,
  action,
  data,
  match = None 
)
 0:   MOD_UNKNOWN, Unknown Means od Death, shouldn't occur at all
 1:   MOD_SHOTGUN, Pumper
 2:   MOD_GAUNTLET, Punchy
 3:   MOD_MACHINEGUN, Nipper
 4:   MOD_GRENADE, Balloony
 5:   MOD_GRENADE_SPLASH, Ballony Splashdamage
 6:   MOD_ROCKET, Betty
 7:   MOD_ROCKET_SPLASH, Betty Splashdamage
 8:   MOD_PLASMA, BubbleG
 9:   MOD_PLASMA_SPLASH, BubbleG Splashdamage
10:   MOD_RAILGUN, Splasher
11:   MOD_LIGHTNING, Boaster
12:   MOD_BFG, Imperius
13:   MOD_BFG_SPLASH, Imperius Splashdamage
14:   MOD_KILLERDUCKS, Killerducks
15:   MOD_WATER, Died in Water
16:   MOD_SLIME, Died in Slime
17:   MOD_LAVA, Died in Lava
18:   MOD_CRUSH, Killed by a Mover
19:   MOD_TELEFRAG, Killed by a Telefrag
20:   MOD_FALLING, Died due to falling damage, but there is no falling damage in WoP
21:   MOD_SUICIDE, Commited Suicide
22:   MOD_TARGET_LASER, Killed by a laser, which don't exist in WoP
23:   MOD_TRIGGER_HURT, Killed by a trigger_hurt
24:   MOD_GRAPPLE, Killed by grapple, not used in WoP

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

def b3::parsers::wop::WopParser::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 from b3::parsers::q3a::abstractParser::AbstractParser.

def b3::parsers::wop::WopParser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::wop::WopParser::parseUserInfo (   self,
  info 
)
def b3::parsers::wop::WopParser::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.


Member Data Documentation

dictionary b3::parsers::wop::WopParser::_eventMap [static, private]
Initial value:
{
        'warmup' : b3.events.EVT_GAME_WARMUP,
        'shutdowngame' : b3.events.EVT_GAME_ROUND_END
    }

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

tuple b3::parsers::wop::WopParser::_lineClear = re.compile(r'^(?:[0-9:]+\s?)?') [static, private]
Initial value:
(
        #Generated with : WOP version 1.2
        #ClientConnect: 2 77F303414E4355E0860B483F2A07E4DF 151.16.71.226:27960
        re.compile(r'^(?P<action>[a-z]+):\s(?P<data>(?P<cid>[0-9]+)\s(?P<cl_guid>[0-9A-Z]{32})\s+(?P<ip>[0-9.]+):(?P<port>[0-9]+))$', re.IGNORECASE),
        #Kill: 3 2 8: Beinchen killed linux suse 10.3 by MOD_PLASMA
        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),
        #ClientConnect: 2  151.16.71.226:27960
        re.compile(r'^(?P<action>[a-z]+):\s(?P<data>(?P<cid>[0-9]+)\s+(?P<ip>[0-9.]+):(?P<port>[0-9]+))$', re.IGNORECASE),
        #say: ^3Ghost^2Pirate: Saw red huh?
        re.compile(r'^(?P<action>say):\s*(?P<data>(?P<name>[^:]+):\s*(?P<text>.*))$', re.IGNORECASE),
        #Bot connecting
        #ClientConnect: 0
        re.compile(r'^(?P<action>ClientConnect):\s*(?P<data>(?P<bcid>[0-9]+))$', re.IGNORECASE),
        #Falling thru? Item stuff and so forth... still need some other actions from CTF and other gametypes to compare.  
        #Item: 3 ammo_spray_n
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>.*)$', re.IGNORECASE)
    )

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

tuple b3::parsers::wop::WopParser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [static, private]
tuple b3::parsers::wop::WopParser::_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::wop::WopParser::MOD_BFG = '12' [static]
string b3::parsers::wop::WopParser::MOD_LAVA = '17' [static]

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