diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-16 20:41:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-16 20:42:17 +0300 |
commit | ae7f2a6c850b841693082a401ecdb4e572cfc9cc (patch) | |
tree | 00b71481eb557e7ac501c6472026c3f6219ec517 /servergreps/hercules/src/threeceam.py | |
parent | 5d512ce82c9dcb4047634c08227917c26cf761c2 (diff) | |
download | evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.gz evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.bz2 evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.xz evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.zip |
servergreps: add support for parsing char server packets in other servers
Diffstat (limited to 'servergreps/hercules/src/threeceam.py')
-rwxr-xr-x | servergreps/hercules/src/threeceam.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/servergreps/hercules/src/threeceam.py b/servergreps/hercules/src/threeceam.py index 4b9fd02..77e1f19 100755 --- a/servergreps/hercules/src/threeceam.py +++ b/servergreps/hercules/src/threeceam.py @@ -8,6 +8,7 @@ import os import re from src.preproc import PreProc +from src.utils import Utils filt = re.compile(".+[.](c|h)", re.IGNORECASE) @@ -194,6 +195,12 @@ class Threeceam: self.functionToId[m.group("function")] = data + def collectCharInPackets(self, charFilePackets): + for packets in Utils.enumCasePackets(charFilePackets, "int char_parse_char(int fd)"): + self.inPackets[packets[1]] = (0, packets[0]) + self.functionToId[packets[0]] = packets[1] + + def sortInPackets(self): for packet in self.inPackets: self.inPacketsSorted.append(packet) @@ -205,9 +212,11 @@ class Threeceam: srcPath = packetDir + "/src/" + self.dirName # serverInPacketsHPath = packetDir + "/src/" + self.dirName + "/packets.h" # serverLoginInPackets = packetDir + "/src/" + self.dirName + "/lclif.c" +# serverCharPackets = packetDir + "/src/" + self.dirName + "/char.c" # self.collectNamedPackets(namedPacketsPath) self.collectOutPackets(srcPath) # self.collectInPackets(serverInPacketsHPath, serverLoginInPackets) +# self.collectCharInPackets(serverCharPackets); # self.sortInPackets() self.sortOutPackets() |