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

b3::parsers::frostbite2::util::BanlistContent Class Reference

List of all members.

Public Member Functions

def __init__
def append
def __len__
def __getitem__
def getData
def __repr__
def __init__
def append
def __len__
def __getitem__
def getData
def __repr__

Public Attributes

 numOfBans
 bansData

Detailed Description

help extract banlist info from a frostbite banList.list response

usage :
    words = [
        'name', 'Courgette', 'perm',         , 'test',
        'name', 'Courgette', 'seconds', 3600 , 'test2'] 
    bansInfo = BanlistContent(words)
    print "num of bans : %s" % len(bansInfo)
    print "first ban : %s" % bansInfo[0]
    print "second ban : %s" % bansInfo[1]
    print "the first 2 bans : %s" % bansInfo[0:2]
    for b in bansInfo:
        print b

Constructor & Destructor Documentation

def b3::parsers::frostbite2::util::BanlistContent::__init__ (   self,
  data = None 
)
Represent a frostbite banList.list response
Request: banList.list 
Response: OK <player ban entries> 
Response: InvalidArguments 
Effect: Return list of banned players/IPs/GUIDs. 
Comment: 6 words (Id-type, id, ban-type, seconds left, rounds left, and reason) are received for every ban in
the list.
If no startOffset is supplied, it is assumed to be 0.
At most 100 entries will be returned by the command. To retrieve the full list, perform several banList.list
calls with increasing offset until the server returns 0 entries.
(There is an unsolved synchronization problem hidden there: if a ban expires during this process, then one other
entry will be skipped during retrieval. There is no known workaround for this.)
def b3::parsers::frostbite2::util::BanlistContent::__init__ (   self,
  data = None 
)
Represent a frostbite banList.list response
Request: banList.list 
Response: OK <player ban entries> 
Response: InvalidArguments 
Effect: Return list of banned players/IPs/GUIDs. 
Comment: 6 words (Id-type, id, ban-type, seconds left, rounds left, and reason) are received for every ban in
the list.
If no startOffset is supplied, it is assumed to be 0.
At most 100 entries will be returned by the command. To retrieve the full list, perform several banList.list
calls with increasing offset until the server returns 0 entries.
(There is an unsolved synchronization problem hidden there: if a ban expires during this process, then one other
entry will be skipped during retrieval. There is no known workaround for this.)

Member Function Documentation

def b3::parsers::frostbite2::util::BanlistContent::__getitem__ (   self,
  key 
)
Returns the ban data, for provided key (int or slice)
def b3::parsers::frostbite2::util::BanlistContent::__getitem__ (   self,
  key 
)
Returns the ban data, for provided key (int or slice)
def b3::parsers::frostbite2::util::BanlistContent::__len__ (   self)
def b3::parsers::frostbite2::util::BanlistContent::__len__ (   self)
def b3::parsers::frostbite2::util::BanlistContent::__repr__ (   self)
def b3::parsers::frostbite2::util::BanlistContent::__repr__ (   self)
def b3::parsers::frostbite2::util::BanlistContent::append (   self,
  data 
)
Parses and appends the maps from raw_data.
data : words as received from the Frostbite2 mapList.list command
def b3::parsers::frostbite2::util::BanlistContent::append (   self,
  data 
)
Parses and appends the maps from raw_data.
data : words as received from the Frostbite2 mapList.list command
def b3::parsers::frostbite2::util::BanlistContent::getData (   self,
  index 
)
def b3::parsers::frostbite2::util::BanlistContent::getData (   self,
  index 
)

Member Data Documentation


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