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

b3::parsers::iourt41::Iourt41Parser Class Reference

Inheritance diagram for b3::parsers::iourt41::Iourt41Parser:
b3::parsers::q3a::abstractParser::AbstractParser b3::parser::Parser

List of all members.

Public Member Functions

def startup
def getLineParts
def parseUserInfo
def getCvar
def getTeam
def defineGameType
def broadcast
def saybig
def inflictCustomPenalty
def OnClientconnect
def OnClientuserinfo
def OnClientuserinfochanged
def OnHit
def OnKill
def OnClientdisconnect
def OnFlag
def OnFlagReturn
def OnBomb
def OnBombholder
def OnAction
def OnItem
def OnSay
def OnSayteam
def OnSaytell
def OnTell
def OnShutdowngame
def OnInitgame
def OnWarmup
def OnInitround
def ban
def unban
def getPlayerPings
def sync
def getMaps
def getNextMap
def getTeamScores
def getScores
def joinPlayers
def queryClientUserInfoByCid
def getByCidOrJoinPlayer
def CorrectPlayersTeam

Static Public Attributes

string gameName = 'iourt41'
 IpsOnly = False
 IpCombi = False
 PunkBuster = None
string MOD_WATER = '1'
 kill modes
string MOD_LAVA = '3'
string MOD_TELEFRAG = '5'
string MOD_FALLING = '6'
string MOD_SUICIDE = '7'
string MOD_TRIGGER_HURT = '9'
string MOD_CHANGE_TEAM = '10'
string UT_MOD_KNIFE = '12'
string UT_MOD_KNIFE_THROWN = '13'
string UT_MOD_BERETTA = '14'
string UT_MOD_DEAGLE = '15'
string UT_MOD_SPAS = '16'
string UT_MOD_UMP45 = '17'
string UT_MOD_MP5K = '18'
string UT_MOD_LR300 = '19'
string UT_MOD_G36 = '20'
string UT_MOD_PSG1 = '21'
string UT_MOD_HK69 = '22'
string UT_MOD_BLED = '23'
string UT_MOD_KICKED = '24'
string UT_MOD_HEGRENADE = '25'
string UT_MOD_SR8 = '28'
string UT_MOD_AK103 = '30'
string UT_MOD_SPLODED = '31'
string UT_MOD_SLAPPED = '32'
string UT_MOD_BOMBED = '33'
string UT_MOD_NUKED = '34'
string UT_MOD_NEGEV = '35'
string UT_MOD_HK69_HIT = '37'
string UT_MOD_M4 = '38'
string UT_MOD_FLAG = '39'
string UT_MOD_GOOMBA = '40'

Private Member Functions

def _unbanmultiple

Static Private Attributes

 _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]+|CNCT|ZMBI)\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]')
tuple _reTeamScores = re.compile(r'^Scores:\s+R:(?P<RedScore>.+)\s+B:(?P<BlueScore>.+)$', re.I)
tuple _rePlayerScore = re.compile(r'^(?P<slot>[0-9]+): (?P<name>.*) (?P<team>RED|BLUE|SPECTATOR|FREE) k:(?P<kill>[0-9]+) d:(?P<death>[0-9]+) ping:(?P<ping>[0-9]+|CNCT|ZMBI)( (?P<ip>[0-9.]+):(?P<port>[0-9-]+))?$', re.I)
tuple _reCvarName = re.compile(r'^[a-z0-9_.]+$', re.I)
tuple _reCvar

Member Function Documentation

def b3::parsers::iourt41::Iourt41Parser::_unbanmultiple (   self,
  client,
  admin = None 
) [private]
def b3::parsers::iourt41::Iourt41Parser::ban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
ban a given player

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

def b3::parsers::iourt41::Iourt41Parser::broadcast (   self,
  msg 
)
def b3::parsers::iourt41::Iourt41Parser::CorrectPlayersTeam (   self)
/rcon players
Map: ut4_heroic_beta1
Players: 16
Scores: R:51 B:92
0:  FREE k:0 d:0 ping:0
0:  FREE k:0 d:0 ping:0
2: Anibal BLUE k:24 d:11 ping:69 90.47.240.44:27960
3: kasper01 RED k:6 d:28 ping:56 93.22.173.133:27960
4: notorcan RED k:16 d:10 ping:51 86.206.51.250:27960
5: laCourge SPECTATOR k:0 d:0 ping:48 81.56.143.41:27960
6: fundy_kill BLUE k:6 d:9 ping:50 92.129.99.62:27960
7: brillko BLUE k:25 d:11 ping:56 85.224.201.172:27960
8: -Tuxmania- BLUE k:16 d:7 ping:48 81.231.39.32:27960
9: j.i.goe RED k:1 d:4 ping:51 86.218.69.81:27960
10: EasyRider RED k:10 d:12 ping:53 85.176.137.142:27960
11: Ferd75 BLUE k:4 d:8 ping:48 90.3.171.84:27960
12: frag4#Gost0r RED k:11 d:16 ping:74 79.229.27.54:27960
13: {'OuT'}ToinetoX RED k:6 d:13 ping:67 81.48.189.135:27960
14: GibsonSG BLUE k:-1 d:2 ping:37 84.60.3.67:27960
15: Kjeldor BLUE k:16 d:9 ping:80 85.246.3.196:50851
NOTE: this won't work fully if the server has private slots. see http://forums.urbanterror.net/index.php/topic,9356.0.html
def b3::parsers::iourt41::Iourt41Parser::defineGameType (   self,
  gameTypeInt 
)
def b3::parsers::iourt41::Iourt41Parser::getByCidOrJoinPlayer (   self,
  cid 
)
def b3::parsers::iourt41::Iourt41Parser::getCvar (   self,
  cvarName 
)
def b3::parsers::iourt41::Iourt41Parser::getLineParts (   self,
  line 
)
def b3::parsers::iourt41::Iourt41Parser::getMaps (   self)
\
return the available maps/levels name

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

def b3::parsers::iourt41::Iourt41Parser::getNextMap (   self)
def b3::parsers::iourt41::Iourt41Parser::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::iourt41::Iourt41Parser::getScores (   self)
NOTE: this won't work properly if the server has private slots. see http://forums.urbanterror.net/index.php/topic,9356.0.html
def b3::parsers::iourt41::Iourt41Parser::getTeam (   self,
  team 
)
def b3::parsers::iourt41::Iourt41Parser::getTeamScores (   self)
def b3::parsers::iourt41::Iourt41Parser::inflictCustomPenalty (   self,
  type,
  client,
  reason = None,
  duration = None,
  admin = None,
  data = None 
)
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', 'kill' or anything you want.
/!\ This method must return True if the penalty was inflicted.

Reimplemented from b3::parser::Parser.

def b3::parsers::iourt41::Iourt41Parser::joinPlayers (   self)
def b3::parsers::iourt41::Iourt41Parser::OnAction (   self,
  cid,
  actiontype,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnBomb (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnBombholder (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnClientconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnClientdisconnect (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnClientuserinfo (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnClientuserinfochanged (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnFlag (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnFlagReturn (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnHit (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnInitgame (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnInitround (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnItem (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnKill (   self,
  action,
  data,
  match = None 
)
1:      MOD_WATER === exclusive attackers : , 1022(<world>), 0(<non-client>)
3:      MOD_LAVA === exclusive attackers : , 1022(<world>), 0(<non-client>)
5:      MOD_TELEFRAG --- normal kill line
6:      MOD_FALLING === exclusive attackers : , 1022(<world>), 0(<non-client>)
7:      MOD_SUICIDE ===> attacker is always the victim
9:      MOD_TRIGGER_HURT === exclusive attackers : , 1022(<world>)
10:     MOD_CHANGE_TEAM ===> attacker is always the victim
12:     UT_MOD_KNIFE --- normal kill line
13:     UT_MOD_KNIFE_THROWN --- normal kill line
14:     UT_MOD_BERETTA --- normal kill line
15:     UT_MOD_DEAGLE --- normal kill line
16:     UT_MOD_SPAS --- normal kill line
17:     UT_MOD_UMP45 --- normal kill line
18:     UT_MOD_MP5K --- normal kill line
19:     UT_MOD_LR300 --- normal kill line
20:     UT_MOD_G36 --- normal kill line
21:     UT_MOD_PSG1 --- normal kill line
22:     UT_MOD_HK69 --- normal kill line
23:     UT_MOD_BLED --- normal kill line
24:     UT_MOD_KICKED --- normal kill line
25:     UT_MOD_HEGRENADE --- normal kill line
28:     UT_MOD_SR8 --- normal kill line
30:     UT_MOD_AK103 --- normal kill line
31:     UT_MOD_SPLODED ===> attacker is always the victim
32:     UT_MOD_SLAPPED ===> attacker is always the victim
33:     UT_MOD_BOMBED --- normal kill line
34:     UT_MOD_NUKED --- normal kill line
35:     UT_MOD_NEGEV --- normal kill line
37:     UT_MOD_HK69_HIT --- normal kill line
38:     UT_MOD_M4 --- normal kill line
39:     UT_MOD_FLAG === exclusive attackers : , 0(<non-client>)
40:     UT_MOD_GOOMBA --- normal kill line

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

def b3::parsers::iourt41::Iourt41Parser::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::iourt41::Iourt41Parser::OnSayteam (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnSaytell (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnShutdowngame (   self,
  action,
  data = None,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnTell (   self,
  action,
  data,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::OnWarmup (   self,
  action,
  data = None,
  match = None 
)
def b3::parsers::iourt41::Iourt41Parser::parseUserInfo (   self,
  info 
)
Just extract the cid and pairs of key/value without any treatment

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

def b3::parsers::iourt41::Iourt41Parser::queryClientUserInfoByCid (   self,
  cid 
)
: dumpuser 5
Player 5 is not on the server

: dumpuser 3
userinfo
--------
ip                  62.235.246.103:27960
name                Shinki
racered             2
raceblue            2
rate                8000
ut_timenudge        0
cg_rgb              255 0 255
cg_predictitems     0
cg_physics          1
gear                GLJAXUA
cl_anonymous        0
sex                 male
handicap            100
color2              5
color1              4
team_headmodel      *james
team_model          james
headmodel           sarge
model               sarge
snaps               20
teamtask            0
cl_guid             8982B13A8DCEE4C77A32E6AC4DD7EEDF
weapmodes           00000110220000020002

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

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

def b3::parsers::iourt41::Iourt41Parser::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::iourt41::Iourt41Parser::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::iourt41::Iourt41Parser::unban (   self,
  client,
  reason = '',
  admin = None,
  silent = False,
  kwargs 
)
\
unban a given player

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


Member Data Documentation

string b3::parsers::iourt41::Iourt41Parser::_empty_name_default = 'EmptyNameDefault' [static, private]
dictionary b3::parsers::iourt41::Iourt41Parser::_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::iourt41::Iourt41Parser::_lineClear = re.compile(r'^(?:[0-9:]+\s?)?') [static, private]
tuple b3::parsers::iourt41::Iourt41Parser::_reColor = re.compile(r'(\^.)|[\x00-\x20]|[\x7E-\xff]') [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<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),
    )

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

tuple b3::parsers::iourt41::Iourt41Parser::_reCvarName = re.compile(r'^[a-z0-9_.]+$', re.I) [static, private]
tuple b3::parsers::iourt41::Iourt41Parser::_regPlayer = re.compile(r'^(?P<slot>[0-9]+)\s+(?P<score>[0-9-]+)\s+(?P<ping>[0-9]+|CNCT|ZMBI)\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::iourt41::Iourt41Parser::_rePlayerScore = re.compile(r'^(?P<slot>[0-9]+): (?P<name>.*) (?P<team>RED|BLUE|SPECTATOR|FREE) k:(?P<kill>[0-9]+) d:(?P<death>[0-9]+) ping:(?P<ping>[0-9]+|CNCT|ZMBI)( (?P<ip>[0-9.]+):(?P<port>[0-9-]+))?$', re.I) [static, private]
tuple b3::parsers::iourt41::Iourt41Parser::_reTeamScores = re.compile(r'^Scores:\s+R:(?P<RedScore>.+)\s+B:(?P<BlueScore>.+)$', re.I) [static, private]

kill modes


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