diff options
-rw-r--r-- | src/char/HPMchar.c | 8 | ||||
-rw-r--r-- | src/common/HPM.c | 2 | ||||
-rw-r--r-- | src/login/HPMlogin.c | 8 | ||||
-rw-r--r-- | tools/HPMHookGen/HPMDataCheckGen.pl | 11 |
4 files changed, 10 insertions, 19 deletions
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c index 2d4c570d7..b1ff72628 100644 --- a/src/char/HPMchar.c +++ b/src/char/HPMchar.c @@ -8,7 +8,6 @@ #include "common/HPM.h" #include "common/cbasetypes.h" -#if 0 // TODO (HPMDataCheck is disabled for the time being) #include "char/char.h" #include "char/geoip.h" #include "char/inter.h" @@ -47,7 +46,6 @@ // HPMDataCheck comes after all the other includes #include "common/HPMDataCheck.h" -#endif bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ @@ -62,15 +60,9 @@ void HPM_char_plugin_load_sub(struct hplugin *plugin) { } void HPM_char_do_init(void) { -#if 0 // TODO (HPMDataCheck is disabled for the time being) HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer); -#else - HPM->DataCheck = NULL; -#endif } void HPM_char_do_final(void) { -#if 0 // TODO (HPMDataCheck is disabled for the time being) HPM->datacheck_final(); -#endif } diff --git a/src/common/HPM.c b/src/common/HPM.c index 85f3d9e95..d9abdfab7 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -698,7 +698,7 @@ bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, c } for (i = 0; i < size; i++) { - if (!(src[i].type|SERVER_TYPE)) + if (!(src[i].type&SERVER_TYPE)) continue; if (!strdb_exists(datacheck_db, src[i].name)) { diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c index 129f88c38..1530a1ccb 100644 --- a/src/login/HPMlogin.c +++ b/src/login/HPMlogin.c @@ -8,7 +8,6 @@ #include "common/HPM.h" #include "common/cbasetypes.h" -#if 0 // TODO (HPMDataCheck is disabled for the time being) #include "login/account.h" #include "login/login.h" #include "common/HPMi.h" @@ -32,7 +31,6 @@ // HPMDataCheck comes after all the other includes #include "common/HPMDataCheck.h" -#endif bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ @@ -47,15 +45,9 @@ void HPM_login_plugin_load_sub(struct hplugin *plugin) { } void HPM_login_do_init(void) { -#if 0 // TODO (HPMDataCheck is disabled for the time being) HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer); -#else - HPM->DataCheck = NULL; -#endif } void HPM_login_do_final(void) { -#if 0 // TODO (HPMDataCheck is disabled for the time being) HPM->datacheck_final(); -#endif } diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl index 979d2f1a4..48596eef5 100644 --- a/tools/HPMHookGen/HPMDataCheckGen.pl +++ b/tools/HPMHookGen/HPMDataCheckGen.pl @@ -29,8 +29,15 @@ foreach my $file (@files) { next if $filepath[-1] eq "HPM.h"; # Skip the HPM core, plugins don't need it my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//; my $plugintypes = 'SERVER_TYPE_UNKNOWN'; - $plugintypes = 'SERVER_TYPE_ALL' if $foldername eq 'COMMON'; - $plugintypes = "SERVER_TYPE_${foldername}" if $foldername =~ /^(LOGIN|CHAR|MAP)/; + if ($foldername eq 'COMMON') { + if ($filename eq 'MAPINDEX') { + $plugintypes = 'SERVER_TYPE_CHAR|SERVER_TYPE_MAP'; + } else { + $plugintypes = 'SERVER_TYPE_ALL'; + } + } elsif ($foldername =~ /^(LOGIN|CHAR|MAP)/) { + $plugintypes = "SERVER_TYPE_${foldername}"; + } my $symboldata = { name => $data->{compounddef}->{$filekey}->{compoundname}->[0], type => $plugintypes, |