diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-19 20:21:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-19 20:21:17 +0300 |
commit | f9466262cab28c389702661374656240c30cdbc3 (patch) | |
tree | 38d73c11b081f56b7a227685749ea6b9281b3295 /servergreps | |
parent | 9a266e594a138884bd4f2dad8552a384eb5b17f1 (diff) | |
download | evol-tools-f9466262cab28c389702661374656240c30cdbc3.tar.gz evol-tools-f9466262cab28c389702661374656240c30cdbc3.tar.bz2 evol-tools-f9466262cab28c389702661374656240c30cdbc3.tar.xz evol-tools-f9466262cab28c389702661374656240c30cdbc3.zip |
servergreps: detect replaced packet actions in previous versions.
Diffstat (limited to 'servergreps')
-rwxr-xr-x | servergreps/hercules/packets.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py index f1bfa9f..4c6c6a9 100755 --- a/servergreps/hercules/packets.py +++ b/servergreps/hercules/packets.py @@ -277,8 +277,11 @@ def printPackets(packetDir): clientSet.add(clientPackets[packet][1]) for packet in clientPacketsManaPlusClient: if packet in clientPackets and clientPackets[packet][1] in clientSet: -# print "removing {0}, function: {1}".format(packet, clientPackets[packet][1]) - clientSet.remove(clientPackets[packet][1]) + if clientPacketsManaPlusClient[packet][2] == clientPackets[packet][1]: + clientSet.remove(clientPackets[packet][1]) + else: + if clientPacketsManaPlusClient[packet][2] in clientSet: + clientSet.remove(clientPacketsManaPlusClient[packet][2]) allPackets = set() for packet in clientPackets: @@ -288,17 +291,18 @@ def printPackets(packetDir): for packet in clientSet: rev.append("{0:4} {1:33} {2}".format("?", "UNIMPLIMENTED", packet)) -# rev.append("{0:4} {1:>4} {2} UNIMPLIMENTED".format(packet, clientPackets[packet][0], clientPackets[packet][1])) for packet in allPackets: if packet not in clientPacketsManaPlusClient: continue data = "{0:4} {1:33} ".format(packet, clientPacketsManaPlusClient[packet][0]) if packet in clientPackets: - data = data + clientPackets[packet][1] + if clientPacketsManaPlusClient[packet][2] == clientPackets[packet][1]: + data = data + clientPackets[packet][1] + rev.append(data) else: data = data + "?" - rev.append(data) + rev.append(data) rev.sort() |