diff --git a/docs/api/steam.util.rst b/docs/api/steam.util.rst index 46e73b2..a2585f3 100644 --- a/docs/api/steam.util.rst +++ b/docs/api/steam.util.rst @@ -22,4 +22,10 @@ util.web :undoc-members: :show-inheritance: +util.binary +----------- +.. automodule:: steam.util.binary + :members: + :undoc-members: + :show-inheritance: diff --git a/steam/core/msg/structs.py b/steam/core/msg/structs.py index ef19a00..9a88655 100644 --- a/steam/core/msg/structs.py +++ b/steam/core/msg/structs.py @@ -1,8 +1,10 @@ """Classes to (de)serialize various struct messages""" import struct import six +from six.moves import range from steam.enums import EResult, EUniverse from steam.enums.emsg import EMsg +from steam.util.binary import StructReader _emsg_map = {} @@ -136,19 +138,18 @@ class ClientVACBanStatus(StructMessage): StructMessage.__init__(self, data) def load(self, data): - numBans, = struct.unpack_from(" m.end: m.start, m.end = m.end, m.start - offset += 4 + 4 + 4 - def __str__(self): text = ["numBans: %d" % self.numBans] @@ -179,12 +180,9 @@ class ClientChatMsg(StructMessage): return rbytes def load(self, data): - (self.steamIdChatter, - self.steamIdChatRoom, - self.ChatMsgType, - ) = struct.unpack_from("