summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-15 20:14:43 +0200
committerHaru <haru@dotalux.com>2016-04-16 07:45:16 +0200
commitfb262785af40bfb07918d1ef61641ec88175d559 (patch)
tree256ef5b782c8402feee784c6d1dd68ea52e93fd8 /tools
parent37cc46c5e02bc62a8b510fb53f5c2ed0f2ee5d5f (diff)
downloadhercules-fb262785af40bfb07918d1ef61641ec88175d559.tar.gz
hercules-fb262785af40bfb07918d1ef61641ec88175d559.tar.bz2
hercules-fb262785af40bfb07918d1ef61641ec88175d559.tar.xz
hercules-fb262785af40bfb07918d1ef61641ec88175d559.zip
Added lclif packet handlers to the lclif interface
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index 74cc0f863..0e33fd002 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -361,9 +361,14 @@ foreach my $file (@files) { # Loop through the xml files
$astart <=> $bstart
} @$memberdef) { # Loop through the members
my $t = $f->{argsstring}->[0];
+ my $def = $f->{definition}->[0];
+ if ($f->{type}->[0] =~ /^\s*LoginParseFunc\s*\*\s*$/) {
+ $t = ')(int fd, struct login_session_data *sd)'; # typedef LoginParseFunc
+ $def =~ s/^LoginParseFunc\s*\*\s*(.*)$/enum parsefunc_rcode(* $1) (int fd, struct login_session_data *sd)/;
+ }
next unless ref $t ne 'HASH' and $t =~ /^[^\[]/; # If it's not a string, or if it starts with an array subscript, we can skip it
- my $if = parse($t, $f->{definition}->[0]);
+ my $if = parse($t, $def);
next unless scalar keys %$if; # If it returns an empty hash reference, an error must've occurred
# Skip variadic functions, we only allow hooks on their arglist equivalents.