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

b3::parsers::sof2::Sof2Parser Class Reference

Inheritance diagram for b3::parsers::sof2::Sof2Parser:
b3::parsers::q3a::abstractParser::AbstractParser b3::parsers::q3a::abstractParser::AbstractParser b3::parser::Parser b3::parser::Parser b3::parser::Parser b3::parser::Parser b3::parsers::sof2pm::Sof2PmParser b3::parsers::sof2pm::Sof2PmParser

List of all members.

Public Member Functions

def startup
def getLineParts
def parseUserInfo
def message
def OnClientconnect
def OnClientuserinfo
def OnClientuserinfochanged
def OnClientdisconnect
def OnInitgame
def OnSay
def OnSayteam
def OnHit
def OnKill
def OnItem
def defineGameType
def joinPlayers
def queryClientUserInfoByName
def getByNameOrJoinPlayer
def startup
def getLineParts
def parseUserInfo
def message
def OnClientconnect
def OnClientuserinfo
def OnClientuserinfochanged
def OnClientdisconnect
def OnInitgame
def OnSay
def OnSayteam
def OnHit
def OnKill
def OnItem
def defineGameType
def joinPlayers
def queryClientUserInfoByName
def getByNameOrJoinPlayer

Static Public Attributes

string gameName = 'sof2'
 IpsOnly = False
 IpCombi = False
 privateMsg = False
 PunkBuster = None
string MOD_UNKNOWN = '0'
string MOD_KNIFE = '1'
string MOD_M1911A1_PISTOL = '2'
string MOD_USSOCOM_PISTOL = '3'
string MOD_SILVER_TALON = '4'
string MOD_M590_SHOTGUN = '5'
string MOD_MICRO_UZI_SUBMACHINEGUN = '6'
string MOD_M3A1_SUBMACHINEGUN = '7'
string MOD_MP5 = '8'
string MOD_USAS_12_SHOTGUN = '9'
string MOD_M4_ASSAULT_RIFLE = '10'
string MOD_AK74_ASSAULT_RIFLE = '11'
string MOD_SIG551 = '12'
string MOD_MSG90A1_SNIPER_RIFLE = '13'
string MOD_M60_MACHINEGUN = '14'
string MOD_MM1_GRENADE_LAUNCHER = '15'
string MOD_RPG7_LAUNCHER = '16'
string MOD_M84_GRENADE = '17'
string MOD_SMOHG92_GRENADE = '18'
string MOD_ANM14_GRENADE = '19'
string MOD_M15_GRENADE = '20'
string MOD_WATER = '21'
string MOD_CRUSH = '22'
string MOD_TELEFRAG = '23'
string MOD_FALLING = '24'
string MOD_SUICIDE = '25'
string MOD_TEAMCHANGE = '26'
string MOD_TARGET_LASER = '27'
string MOD_TRIGGER_HURT = '28'
string MOD_TRIGGER_HURT_NOSUICIDE = '29'
string MOD_ADMIN_STRIKE = '30'
string MOD_ADMIN_SLAP = '31'
string MOD_ADMIN_FRY = '32'
string MOD_ADMIN_EXPLODE = '33'
string MOD_ADMIN_TELEFRAG = '34'
string MOD_KNIFE_ALT = '35'
string MOD_M1911A1_PISTOL_ALT = '36'
string MOD_USSOCOM_PISTOL_ALT = '37'
string MOD_SILVER_TALON_ALT = '38'
string MOD_M590_SHOTGUN_ALT = '39'
string MOD_M4_ASSAULT_RIFLE_ALT = '40'
string MOD_AK74_ASSAULT_RIFLE_ALT = '41'
string MOD_M84_GRENADE_ALT = '42'
string MOD_SMOHG92_GRENADE_ALT = '43'
string MOD_ANM14_GRENADE_ALT = '44'
string MOD_M15_GRENADE_ALT = '45'

Private Attributes

 _clientConnectID
 _clientConnectGuid
 _clientConnectIp

Static Private Attributes

string _empty_name_default = 'EmptyNameDefault'
dictionary _settings = {}
dictionary _commands = {}
dictionary _eventMap
tuple _lineClear = re.compile(r'^(?:[0-9:]+\s?)?')
tuple _lineFormats
tuple _regPlayer
tuple _reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]')

Member Function Documentation

def b3::parsers::sof2::Sof2Parser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::sof2::Sof2Parser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::sof2::Sof2Parser::getByNameOrJoinPlayer (   self,
  name 
)
def b3::parsers::sof2::Sof2Parser::getByNameOrJoinPlayer (   self,
  name 
)
def b3::parsers::sof2::Sof2Parser::getLineParts (   self,
  line 
)
def b3::parsers::sof2::Sof2Parser::getLineParts (   self,
  line 
)
def b3::parsers::sof2::Sof2Parser::joinPlayers (   self)
def b3::parsers::sof2::Sof2Parser::joinPlayers (   self)
def b3::parsers::sof2::Sof2Parser::message (   self,
  client,
  text 
)
\
display a message to a given player

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

Reimplemented in b3::parsers::sof2pm::Sof2PmParser, and b3::parsers::sof2pm::Sof2PmParser.

def b3::parsers::sof2::Sof2Parser::message (   self,
  client,
  text 
)
\
display a message to a given player

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

Reimplemented in b3::parsers::sof2pm::Sof2PmParser, and b3::parsers::sof2pm::Sof2PmParser.

def b3::parsers::sof2::Sof2Parser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientuserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientuserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnHit (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnHit (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnKill (   self,
  action,
  data,
  match = None 
)
0:	MOD_UNKNOWN, UNKNOWN
1:	MOD_KNIFE, Killed by KNIFE
2:	MOD_M1911A1_PISTOL, Killed by M1911A1_PISTOL
3:	MOD_USSOCOM_PISTOL, Killed by USSOCOM_PISTOL
4:	MOD_SILVER_TALON, Killed by SILVER_TALON
5:	MOD_M590_SHOTGUN, Killed by M590_SHOTGUN
6:	MOD_MICRO_UZI_SUBMACHINEGUN, Killed by MICRO_UZI_SUBMACHINEGUN
7:	MOD_M3A1_SUBMACHINEGUN, Killed by M3A1_SUBMACHINEGUN
8:	MOD_MP5, Killed by MP5
9:	MOD_USAS_12_SHOTGUN, Killed by USAS_12_SHOTGUN
10:	MOD_M4_ASSAULT_RIFLE, Killed by M4_ASSAULT_RIFLE
11:	MOD_AK74_ASSAULT_RIFLE, Killed by AK74_ASSAULT_RIFLE
12:	MOD_SIG551, Killed by SIG551
13:	MOD_MSG90A1_SNIPER_RIFLE, Killed by MSG90A1_SNIPER_RIFLE
14:	MOD_M60_MACHINEGUN, Killed by M60_MACHINEGUN
15:	MOD_MM1_GRENADE_LAUNCHER, Killed by MM1_GRENADE_LAUNCHER
16:	MOD_RPG7_LAUNCHER, Killed by RPG7_LAUNCHER
17:	MOD_M84_GRENADE, Killed by M84_GRENADE
18:	MOD_SMOHG92_GRENADE, Killed by SMOHG92_GRENADE
19:	MOD_ANM14_GRENADE, Killed by ANM14_GRENADE
20:	MOD_M15_GRENADE, Killed by M15_GRENADE
21:	MOD_WATER, Killed by WATER
22:	MOD_CRUSH, Killed by Mover
23:	MOD_TELEFRAG, Killed by TELEFRAG
24:	MOD_FALLING, Killed by FALLING
25:	MOD_SUICIDE, Killed by SUICIDE
26:	MOD_TEAMCHANGE, Killed by TEAMCHANGE
27:	MOD_TARGET_LASER, Killed by TARGET_LASER
28:	MOD_TRIGGER_HURT, Killed by TRIGGER_HURT
29:	MOD_TRIGGER_HURT_NOSUICIDE, Killed by TRIGGER_HURT_NOSUICIDE
30:	MOD_ADMIN_STRIKE, Killed by ADMIN_STRIKE
31:	MOD_ADMIN_SLAP, Killed by ADMIN_SLAP
32:	MOD_ADMIN_FRY, Killed by ADMIN_FRY
33:	MOD_ADMIN_EXPLODE, Killed by ADMIN_EXPLODE
34:	MOD_ADMIN_TELEFRAG, Killed by ADMIN_TELEFRAG
35:	MOD_KNIFE_ALT, Killed by KNIFE_ALT
36:	MOD_M1911A1_PISTOL_ALT, Killed by M1911A1_PISTOL_ALT
37:	MOD_USSOCOM_PISTOL_ALT, Killed by USSOCOM_PISTOL_ALT
38:	MOD_SILVER_TALON_ALT, Killed by SILVER_TALON_ALT
39:	MOD_M590_SHOTGUN_ALT, Killed by M590_SHOTGUN_ALT
40:	MOD_M4_ASSAULT_RIFLE_ALT, Killed by M4_ASSAULT_RIFLE_ALT
41:	MOD_AK74_ASSAULT_RIFLE, Killed by AK74_ASSAULT_RIFLE
42:	MOD_M84_GRENADE_ALT, Killed by M84_GRENADE_ALT
43:	MOD_SMOHG92_GRENADE_ALT, Killed by SMOHG92_GRENADE_ALT
44:	MOD_ANM14_GRENADE_ALT, Killed by ANM14_GRENADE_ALT
45:	MOD_M15_GRENADE_ALT, Killed by M15_GRENADE_ALT

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

def b3::parsers::sof2::Sof2Parser::OnKill (   self,
  action,
  data,
  match = None 
)
0:	MOD_UNKNOWN, UNKNOWN
1:	MOD_KNIFE, Killed by KNIFE
2:	MOD_M1911A1_PISTOL, Killed by M1911A1_PISTOL
3:	MOD_USSOCOM_PISTOL, Killed by USSOCOM_PISTOL
4:	MOD_SILVER_TALON, Killed by SILVER_TALON
5:	MOD_M590_SHOTGUN, Killed by M590_SHOTGUN
6:	MOD_MICRO_UZI_SUBMACHINEGUN, Killed by MICRO_UZI_SUBMACHINEGUN
7:	MOD_M3A1_SUBMACHINEGUN, Killed by M3A1_SUBMACHINEGUN
8:	MOD_MP5, Killed by MP5
9:	MOD_USAS_12_SHOTGUN, Killed by USAS_12_SHOTGUN
10:	MOD_M4_ASSAULT_RIFLE, Killed by M4_ASSAULT_RIFLE
11:	MOD_AK74_ASSAULT_RIFLE, Killed by AK74_ASSAULT_RIFLE
12:	MOD_SIG551, Killed by SIG551
13:	MOD_MSG90A1_SNIPER_RIFLE, Killed by MSG90A1_SNIPER_RIFLE
14:	MOD_M60_MACHINEGUN, Killed by M60_MACHINEGUN
15:	MOD_MM1_GRENADE_LAUNCHER, Killed by MM1_GRENADE_LAUNCHER
16:	MOD_RPG7_LAUNCHER, Killed by RPG7_LAUNCHER
17:	MOD_M84_GRENADE, Killed by M84_GRENADE
18:	MOD_SMOHG92_GRENADE, Killed by SMOHG92_GRENADE
19:	MOD_ANM14_GRENADE, Killed by ANM14_GRENADE
20:	MOD_M15_GRENADE, Killed by M15_GRENADE
21:	MOD_WATER, Killed by WATER
22:	MOD_CRUSH, Killed by Mover
23:	MOD_TELEFRAG, Killed by TELEFRAG
24:	MOD_FALLING, Killed by FALLING
25:	MOD_SUICIDE, Killed by SUICIDE
26:	MOD_TEAMCHANGE, Killed by TEAMCHANGE
27:	MOD_TARGET_LASER, Killed by TARGET_LASER
28:	MOD_TRIGGER_HURT, Killed by TRIGGER_HURT
29:	MOD_TRIGGER_HURT_NOSUICIDE, Killed by TRIGGER_HURT_NOSUICIDE
30:	MOD_ADMIN_STRIKE, Killed by ADMIN_STRIKE
31:	MOD_ADMIN_SLAP, Killed by ADMIN_SLAP
32:	MOD_ADMIN_FRY, Killed by ADMIN_FRY
33:	MOD_ADMIN_EXPLODE, Killed by ADMIN_EXPLODE
34:	MOD_ADMIN_TELEFRAG, Killed by ADMIN_TELEFRAG
35:	MOD_KNIFE_ALT, Killed by KNIFE_ALT
36:	MOD_M1911A1_PISTOL_ALT, Killed by M1911A1_PISTOL_ALT
37:	MOD_USSOCOM_PISTOL_ALT, Killed by USSOCOM_PISTOL_ALT
38:	MOD_SILVER_TALON_ALT, Killed by SILVER_TALON_ALT
39:	MOD_M590_SHOTGUN_ALT, Killed by M590_SHOTGUN_ALT
40:	MOD_M4_ASSAULT_RIFLE_ALT, Killed by M4_ASSAULT_RIFLE_ALT
41:	MOD_AK74_ASSAULT_RIFLE, Killed by AK74_ASSAULT_RIFLE
42:	MOD_M84_GRENADE_ALT, Killed by M84_GRENADE_ALT
43:	MOD_SMOHG92_GRENADE_ALT, Killed by SMOHG92_GRENADE_ALT
44:	MOD_ANM14_GRENADE_ALT, Killed by ANM14_GRENADE_ALT
45:	MOD_M15_GRENADE_ALT, Killed by M15_GRENADE_ALT

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

def b3::parsers::sof2::Sof2Parser::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::sof2::Sof2Parser::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::sof2::Sof2Parser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::sof2::Sof2Parser::parseUserInfo (   self,
  info 
)
def b3::parsers::sof2::Sof2Parser::parseUserInfo (   self,
  info 
)
def b3::parsers::sof2::Sof2Parser::queryClientUserInfoByName (   self,
  cid,
  name 
)
]\dumpuser xlr8or
Player xlr8or is not on the server

]\dumpuser xlr8or
userinfo
--------
ip                  145.99.135.000:-12892
cl_guid             XXXXD914662572D3649B94B1EA5F921
cl_punkbuster       0
details             5
name                xlr8or
rate                9000
snaps               20
identity            NPC_Sam/sam_gladstone
cl_anonymous        0
cg_predictItems     1
cg_antiLag          1
cg_autoReload       1
cg_smoothClients    0
team_identity       shopguard1
outfitting          GACAA

def b3::parsers::sof2::Sof2Parser::queryClientUserInfoByName (   self,
  cid,
  name 
)
]\dumpuser xlr8or
Player xlr8or is not on the server

]\dumpuser xlr8or
userinfo
--------
ip                  145.99.135.000:-12892
cl_guid             XXXXD914662572D3649B94B1EA5F921
cl_punkbuster       0
details             5
name                xlr8or
rate                9000
snaps               20
identity            NPC_Sam/sam_gladstone
cl_anonymous        0
cg_predictItems     1
cg_antiLag          1
cg_autoReload       1
cg_smoothClients    0
team_identity       shopguard1
outfitting          GACAA

def b3::parsers::sof2::Sof2Parser::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::sof2::Sof2Parser::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

string b3::parsers::sof2::Sof2Parser::_empty_name_default = 'EmptyNameDefault' [static, private]
dictionary b3::parsers::sof2::Sof2Parser::_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::sof2::Sof2Parser::_lineClear = re.compile(r'^(?:[0-9:]+\s?)?') [static, private]
Initial value:
(
        #Generated with : SoF2 version: SOF2MP GOLD V1.03 win-x86 Nov  5 2002
        #Kill: 0 0 18: xlr8or killed xlr8or by MOD_SMOHG92_GRENADE
        #Kill: <killer> <victim> <meansofdeath>
        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),

        #hit: 0 0 520 368 0: xlr8or hit xlr8or at location 520 for 368
                #hit: 0 1 8192 80 0: xlr8or hit sh.andrei at location 8192 for 80
        #hit: <acid> <cid> <location> <damage> <meansofdeath>: <aname> hit <name> at location <location> for <damage>
        re.compile(
            r'^(?P<action>[a-z]+):\s(?P<data>(?P<acid>[0-9]+)\s(?P<cid>[0-9]+)\s(?P<hitloc>[0-9]+)\s(?P<damage>[0-9]+)\s(?P<aweap>[0-9]+):\s+(?P<text>.*))$'
            , re.IGNORECASE),

        #say: xlr8or: hello
        re.compile(r'^(?P<action>say):\s*(?P<data>(?P<name>[^:]+):\s*(?P<text>.*))$', re.IGNORECASE),

        #ClientConnect: <cid> - <ip>:<port> [<guid>]
        re.compile(
            r'^(?P<action>[a-z]+):\s(?P<data>(?P<cid>[0-9]+)\s-\s(?P<ip>[0-9.]+):(?P<port>[-0-9]+)\s\[(?P<cl_guid>[0-9A-Z]{32})\])$',
            re.IGNORECASE),

        #Bot connecting
        #ClientConnect: 4 -  []
        re.compile(r'^(?P<action>ClientConnect):\s*(?P<data>(?P<bcid>[0-9]+)\s-\s\s\[\])$', re.IGNORECASE),

        #Falling thru?
        re.compile(r'^(?P<action>[a-z]+):\s*(?P<data>.*)$', re.IGNORECASE)
        )

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

tuple b3::parsers::sof2::Sof2Parser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [static, private]
Initial value:
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)

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


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