diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-03 17:44:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-03 17:44:00 +0300 |
commit | c45c79aa1e2e287c606c9f3f553b65b5b7b635e0 (patch) | |
tree | 9c518dd92f59de2d8c78950713cf3c2b0143fc85 /servergreps/hercules/packets.py | |
parent | 562f2c5c5263d8abc330cf4e667ba1a4b18e58c6 (diff) | |
download | evol-tools-c45c79aa1e2e287c606c9f3f553b65b5b7b635e0.tar.gz evol-tools-c45c79aa1e2e287c606c9f3f553b65b5b7b635e0.tar.bz2 evol-tools-c45c79aa1e2e287c606c9f3f553b65b5b7b635e0.tar.xz evol-tools-c45c79aa1e2e287c606c9f3f553b65b5b7b635e0.zip |
servergreps: separate parsing in and out manaplus packets list.
Diffstat (limited to 'servergreps/hercules/packets.py')
-rwxr-xr-x | servergreps/hercules/packets.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py index c768141..4d1747e 100755 --- a/servergreps/hercules/packets.py +++ b/servergreps/hercules/packets.py @@ -85,13 +85,17 @@ def sortClientPackets(): clientpacketsSorted.append(packet) clientpacketsSorted.sort() -def collectManaPlusPackets(fileName): +def collectManaPlusInPackets(fileName): with open(fileName, "r") as f: for line in f: m = protocolinre.search(line) if m is not None: clientPacketsManaPlus[m.group("packet").lower()] = m.group("name") sizes[m.group("packet").lower()] = m.group("len") + +def collectManaPlusOutPackets(fileName): + with open(fileName, "r") as f: + for line in f: m = protocoloutre.search(line) if m is not None: clientPacketsManaPlus[m.group("packet").lower()] = m.group("name") @@ -242,8 +246,8 @@ eathenaPath = manaplusPath + "net/eathena/" collectNamedPackets(namedPacketsPath); collectServerPackets(srcPath) collectClientPackets(clientPacketsPath) -collectManaPlusPackets(protocolPath + "in.inc") -collectManaPlusPackets(protocolPath + "out.inc") +collectManaPlusInPackets(protocolPath + "in.inc") +collectManaPlusOutPackets(protocolPath + "out.inc") #collectManaPlusSizes(packetsPath); processManaPlusCppFiles(eathenaPath); sortClientPackets() |