diff --git a/steam/core/msg/structs.py b/steam/core/msg/structs.py index bd466e5..b26cde1 100644 --- a/steam/core/msg/structs.py +++ b/steam/core/msg/structs.py @@ -116,17 +116,46 @@ class ClientLogOnResponse(StructMessage): return "eresult: %s" % repr(self.eresult) class ClientVACBanStatus(StructMessage): - numBans = 0 + class VACBanRange(object): + start = 0 + end = 0 - def serialize(self): - return struct.pack(" m.end: + m.start, m.end = m.end, m.start + + offset += 4 + 4 + 4 def __str__(self): - return '\n'.join(["numBans: %d" % self.numBans, - ]) + text = ["numBans: %d" % self.numBans] + + for m in self.ranges: # emulate Protobuf text format + text.append("ranges " + str(m).replace("\n", "\n ", 2)) + + return '\n'.join(text) class ClientChatMsg(StructMessage): steamIdChatter = 0 @@ -236,13 +265,15 @@ class ClientMarketingMessageUpdate2(StructMessage): def count(self): return len(self.messages) - messages = list() + def __init__(self, data): + self.messages = list() + StructMessage.__init__(self, data) def load(self, data): - (self.time, count), self.messages = struct.unpack_from("