From 5dd8a9165d1cd228124c2d9e07c8c38e47251dd6 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 18 Apr 2018 00:16:50 +0200 Subject: [PATCH 1/2] Remove the stat-reporting mechanism Signed-off-by: Haru --- src/char/char.c | 46 +----------- src/char/char.h | 3 +- src/char/inter.c | 3 +- src/config/core.h | 6 +- src/map/battle.c | 173 +--------------------------------------------- src/map/chrif.c | 21 +----- src/map/chrif.h | 3 +- 7 files changed, 9 insertions(+), 246 deletions(-) diff --git a/src/char/char.c b/src/char/char.c index 7e5b7e0dc4c..de4c4c8f01e 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -3803,41 +3803,6 @@ void char_parse_frommap_update_ip(int fd, int id) RFIFOSKIP(fd,6); } -void char_parse_frommap_request_stats_report(int fd) -{ - int sfd;/* stat server fd */ - struct hSockOpt opt; - RFIFOSKIP(fd, 2);/* we skip first 2 bytes which are the 0x3008, so we end up with a buffer equal to the one we send */ - - opt.silent = 1; - opt.setTimeo = 1; - - if ((sfd = sockt->make_connection(sockt->host2ip("stats.herc.ws"),(uint16)25427,&opt) ) == -1) { - RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */ - RFIFOFLUSH(fd); - return;/* connection not possible, we drop the report */ - } - - sockt->session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */ - sockt->realloc_fifo(sfd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); - - WFIFOHEAD(sfd, RFIFOW(fd,2) ); - - memcpy(WFIFOP(sfd,0), RFIFOP(fd, 0), RFIFOW(fd,2)); - - WFIFOSET(sfd, RFIFOW(fd,2) ); - - do { - sockt->flush(sfd); - HSleep(1); - } while( !sockt->session[sfd]->flag.eof && sockt->session[sfd]->wdata_size ); - - sockt->close(sfd); - - RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */ - RFIFOFLUSH(fd); -} - void char_parse_frommap_scdata_update(int fd) { int account_id = RFIFOL(fd, 2); @@ -4068,14 +4033,6 @@ int char_parse_frommap(int fd) chr->parse_frommap_update_ip(fd, id); break; - case 0x3008: - if( RFIFOREST(fd) < RFIFOW(fd,4) ) - return 0;/* packet wasn't fully received yet (still fragmented) */ - else { - chr->parse_frommap_request_stats_report(fd); - } - break; - /* individual sc data insertion/update */ case 0x2740: if( RFIFOREST(fd) < 28 ) @@ -6577,7 +6534,6 @@ void char_defaults(void) chr->map_auth_failed = char_map_auth_failed; chr->parse_frommap_auth_request = char_parse_frommap_auth_request; chr->parse_frommap_update_ip = char_parse_frommap_update_ip; - chr->parse_frommap_request_stats_report = char_parse_frommap_request_stats_report; chr->parse_frommap_scdata_update = char_parse_frommap_scdata_update; chr->parse_frommap_scdata_delete = char_parse_frommap_scdata_delete; chr->parse_frommap = char_parse_frommap; diff --git a/src/char/char.h b/src/char/char.h index 3689690c7c9..93b236966a7 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -225,7 +225,6 @@ struct char_interface { void (*map_auth_failed) (int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip); void (*parse_frommap_auth_request) (int fd, int id); void (*parse_frommap_update_ip) (int fd, int id); - void (*parse_frommap_request_stats_report) (int fd); void (*parse_frommap_scdata_update) (int fd); void (*parse_frommap_scdata_delete) (int fd); int (*parse_frommap) (int fd); diff --git a/src/char/inter.c b/src/char/inter.c index b095a046d69..cd363e8a29c 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -1411,7 +1411,6 @@ int inter_parse_frommap(int fd) case 0x3005: mapif->parse_RegistryRequest(fd); break; case 0x3006: mapif->parse_NameChangeRequest(fd); break; case 0x3007: mapif->parse_accinfo(fd); break; - /* 0x3008 is used by the report stuff */ default: if( inter_party->parse_frommap(fd) || inter_guild->parse_frommap(fd) diff --git a/src/config/core.h b/src/config/core.h index bdc7f3eee9e..a22d47324a6 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -58,10 +58,6 @@ /// Maximum number of characters 'CONSOLE_INPUT' will support per line. #define MAX_CONSOLE_INPUT 150 -/// Uncomment to disable Hercules' anonymous stat report -/// We kindly ask you to consider keeping it enabled, it helps us improve Hercules. -//#define STATS_OPT_OUT - /// Uncomment to enable the Cell Stack Limit mod. /// It's only config is the battle_config custom_cell_stack_limit. /// Only chars affected are those defined in BL_CHAR diff --git a/src/map/battle.c b/src/map/battle.c index 5f56599d7e2..2eddee0e2e5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -20,11 +20,10 @@ */ #define HERCULES_CORE -#include "config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT +#include "config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT #include "battle.h" #include "map/battleground.h" -#include "map/chrif.h" #include "map/clan.h" #include "map/clif.h" #include "map/elemental.h" @@ -7324,168 +7323,6 @@ static const struct battle_data { { "features/enable_attendance_system", &battle_config.feature_enable_attendance_system,1, 0, 1, }, { "features/feature_attendance_endtime",&battle_config.feature_attendance_endtime, 1, 0, 99999999, }, }; -#ifndef STATS_OPT_OUT -/** - * Hercules anonymous statistic usage report -- packet is built here, and sent to char server to report. - **/ -void Hercules_report(char* date, char *time_c) { - int i, bd_size = ARRAYLENGTH(battle_data); - unsigned int config = 0; - char timestring[25]; - time_t curtime; - char* buf; - - enum config_table { - C_CIRCULAR_AREA = 0x0001, - C_CELLNOSTACK = 0x0002, - C_CONSOLE_INPUT = 0x0004, - C_SCRIPT_CALLFUNC_CHECK = 0x0008, - C_OFFICIAL_WALKPATH = 0x0010, - C_RENEWAL = 0x0020, - C_RENEWAL_CAST = 0x0040, - C_RENEWAL_DROP = 0x0080, - C_RENEWAL_EXP = 0x0100, - C_RENEWAL_LVDMG = 0x0200, - C_RENEWAL_EDP = 0x0400, - C_RENEWAL_ASPD = 0x0800, - C_SECURE_NPCTIMEOUT = 0x1000, - //C_SQL_DB_ITEM = 0x2000, - C_SQL_LOGS = 0x4000, - C_MEMWATCH = 0x8000, - C_DMALLOC = 0x10000, - C_GCOLLECT = 0x20000, - C_SEND_SHORTLIST = 0x40000, - //C_SQL_DB_MOB = 0x80000, - //C_SQL_DB_MOBSKILL = 0x100000, - C_PACKETVER_RE = 0x200000, - }; - - /* we get the current time */ - time(&curtime); - strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", localtime(&curtime)); - -#ifdef CIRCULAR_AREA - config |= C_CIRCULAR_AREA; -#endif - -#ifdef CELL_NOSTACK - config |= C_CELLNOSTACK; -#endif - -#ifdef CONSOLE_INPUT - config |= C_CONSOLE_INPUT; -#endif - -#ifdef SCRIPT_CALLFUNC_CHECK - config |= C_SCRIPT_CALLFUNC_CHECK; -#endif - -#ifdef OFFICIAL_WALKPATH - config |= C_OFFICIAL_WALKPATH; -#endif - -#ifdef RENEWAL - config |= C_RENEWAL; -#endif - -#ifdef RENEWAL_CAST - config |= C_RENEWAL_CAST; -#endif - -#ifdef RENEWAL_DROP - config |= C_RENEWAL_DROP; -#endif - -#ifdef RENEWAL_EXP - config |= C_RENEWAL_EXP; -#endif - -#ifdef RENEWAL_LVDMG - config |= C_RENEWAL_LVDMG; -#endif - -#ifdef RENEWAL_EDP - config |= C_RENEWAL_EDP; -#endif - -#ifdef RENEWAL_ASPD - config |= C_RENEWAL_ASPD; -#endif - -#ifdef SECURE_NPCTIMEOUT - config |= C_SECURE_NPCTIMEOUT; -#endif - -#ifdef PACKETVER_RE - config |= C_PACKETVER_RE; -#endif - - /* non-define part */ - if( logs->config.sql_logs ) - config |= C_SQL_LOGS; - -#ifdef MEMWATCH - config |= C_MEMWATCH; -#endif -#ifdef DMALLOC - config |= C_DMALLOC; -#endif -#ifdef GCOLLECT - config |= C_GCOLLECT; -#endif - -#ifdef SEND_SHORTLIST - config |= C_SEND_SHORTLIST; -#endif - -#define BFLAG_LENGTH 35 - - CREATE(buf, char, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 ); - - /* build packet */ - - WBUFW(buf,0) = 0x3000; - WBUFW(buf,2) = 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ); - WBUFW(buf,4) = 0x9f; - - safestrncpy(WBUFP(buf,6), date, 12); - safestrncpy(WBUFP(buf,18), time_c, 9); - safestrncpy(WBUFP(buf,27), timestring, 24); - - safestrncpy(WBUFP(buf,51), sysinfo->platform(), 16); - safestrncpy(WBUFP(buf,67), sysinfo->osversion(), 50); - safestrncpy(WBUFP(buf,117), sysinfo->cpu(), 32); - WBUFL(buf,149) = sysinfo->cpucores(); - safestrncpy(WBUFP(buf,153), sysinfo->arch(), 8); - WBUFB(buf,161) = sysinfo->vcstypeid(); - WBUFB(buf,162) = sysinfo->is64bit(); - safestrncpy(WBUFP(buf,163), sysinfo->vcsrevision_src(), 41); - safestrncpy(WBUFP(buf,204), sysinfo->vcsrevision_scripts(), 41); - WBUFB(buf,245) = (sysinfo->is_superuser()? 1 : 0); - WBUFL(buf,246) = map->getusers(); - - WBUFL(buf,250) = config; - WBUFL(buf,254) = PACKETVER; - - WBUFL(buf,258) = bd_size; - for( i = 0; i < bd_size; i++ ) { - safestrncpy(WBUFP(buf,262 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, BFLAG_LENGTH); - WBUFL(buf,262 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val; - } - - chrif->send_report(buf, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) ); - - aFree(buf); - -#undef BFLAG_LENGTH -} -static int Hercules_report_timer(int tid, int64 tick, int id, intptr_t data) { - if( chrif->isconnected() ) {/* char server relays it, so it must be online. */ - Hercules_report(__DATE__,__TIME__); - } - return 0; -} -#endif bool battle_set_value_sub(int index, int value) { @@ -7694,12 +7531,6 @@ void do_init_battle(bool minimal) { battle->delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR); timer->add_func_list(battle->delay_damage_sub, "battle_delay_damage_sub"); - -#ifndef STATS_OPT_OUT - timer->add_func_list(Hercules_report_timer, "Hercules_report_timer"); - timer->add_interval(timer->gettick()+30000, Hercules_report_timer, 0, 0, 60000 * 30); -#endif - } void do_final_battle(void) { diff --git a/src/map/chrif.c b/src/map/chrif.c index 96f1445230b..13e88b15b5d 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ */ #define HERCULES_CORE -#include "config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT +#include "config/core.h" // AUTOTRADE_PERSISTENCY #include "chrif.h" #include "map/battle.h" @@ -1561,22 +1561,6 @@ bool chrif_removefriend(int char_id, int friend_id) return true; } -void chrif_send_report(char* buf, int len) { -#ifndef STATS_OPT_OUT - if( chrif->fd > 0 ) { - nullpo_retv(buf); - WFIFOHEAD(chrif->fd,len + 2); - - WFIFOW(chrif->fd,0) = 0x3008; - memcpy(WFIFOP(chrif->fd,2), buf, len); - - WFIFOSET(chrif->fd,len + 2); - - sockt->flush(chrif->fd); /* ensure it's sent now. */ - } -#endif -} - /** * Sends a single scdata for saving into char server, meant to ensure integrity of duration-less conditions **/ @@ -1756,7 +1740,6 @@ void chrif_defaults(void) { chrif->divorce = chrif_divorce; chrif->removefriend = chrif_removefriend; - chrif->send_report = chrif_send_report; chrif->flush = chrif_flush; chrif->skillid2idx = chrif_skillid2idx; diff --git a/src/map/chrif.h b/src/map/chrif.h index 615521e0f00..78910d24b83 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -124,7 +124,6 @@ struct chrif_interface { bool (*divorce) (int partner_id1, int partner_id2); bool (*removefriend) (int char_id, int friend_id); - void (*send_report) (char* buf, int len); bool (*flush) (void); void (*skillid2idx) (int fd); From 0903a1f80285f02e1c902dafb2ab5e1783b9e671 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 18 Apr 2018 00:41:38 +0200 Subject: [PATCH 2/2] HPM Hooks Update Signed-off-by: Haru --- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 --- .../HPMHooking_char.HPMHooksCore.inc | 4 --- .../HPMHooking_char.HookingPoints.inc | 1 - .../HPMHooking/HPMHooking_char.Hooks.inc | 26 ------------------- .../HPMHooking_map.HPMHooksCore.inc | 4 --- .../HPMHooking_map.HookingPoints.inc | 1 - .../HPMHooking/HPMHooking_map.Hooks.inc | 26 ------------------- 7 files changed, 66 deletions(-) diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index d2b03c16ca5..ae425e35c9c 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -592,8 +592,6 @@ typedef void (*HPMHOOK_pre_chr_parse_frommap_auth_request) (int *fd, int *id); typedef void (*HPMHOOK_post_chr_parse_frommap_auth_request) (int fd, int id); typedef void (*HPMHOOK_pre_chr_parse_frommap_update_ip) (int *fd, int *id); typedef void (*HPMHOOK_post_chr_parse_frommap_update_ip) (int fd, int id); -typedef void (*HPMHOOK_pre_chr_parse_frommap_request_stats_report) (int *fd); -typedef void (*HPMHOOK_post_chr_parse_frommap_request_stats_report) (int fd); typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_update) (int *fd); typedef void (*HPMHOOK_post_chr_parse_frommap_scdata_update) (int fd); typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_delete) (int *fd); @@ -832,8 +830,6 @@ typedef bool (*HPMHOOK_pre_chrif_divorce) (int *partner_id1, int *partner_id2); typedef bool (*HPMHOOK_post_chrif_divorce) (bool retVal___, int partner_id1, int partner_id2); typedef bool (*HPMHOOK_pre_chrif_removefriend) (int *char_id, int *friend_id); typedef bool (*HPMHOOK_post_chrif_removefriend) (bool retVal___, int char_id, int friend_id); -typedef void (*HPMHOOK_pre_chrif_send_report) (char **buf, int *len); -typedef void (*HPMHOOK_post_chrif_send_report) (char *buf, int len); typedef bool (*HPMHOOK_pre_chrif_flush) (void); typedef bool (*HPMHOOK_post_chrif_flush) (bool retVal___); typedef void (*HPMHOOK_pre_chrif_skillid2idx) (int *fd); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index d81709ff3f7..be39bf2ea66 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -234,8 +234,6 @@ struct { struct HPMHookPoint *HP_chr_parse_frommap_auth_request_post; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_pre; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_post; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_pre; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_pre; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_delete_pre; @@ -1773,8 +1771,6 @@ struct { int HP_chr_parse_frommap_auth_request_post; int HP_chr_parse_frommap_update_ip_pre; int HP_chr_parse_frommap_update_ip_post; - int HP_chr_parse_frommap_request_stats_report_pre; - int HP_chr_parse_frommap_request_stats_report_post; int HP_chr_parse_frommap_scdata_update_pre; int HP_chr_parse_frommap_scdata_update_post; int HP_chr_parse_frommap_scdata_delete_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 26ee544530e..3ba47102c7a 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -132,7 +132,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->map_auth_failed, HP_chr_map_auth_failed) }, { HP_POP(chr->parse_frommap_auth_request, HP_chr_parse_frommap_auth_request) }, { HP_POP(chr->parse_frommap_update_ip, HP_chr_parse_frommap_update_ip) }, - { HP_POP(chr->parse_frommap_request_stats_report, HP_chr_parse_frommap_request_stats_report) }, { HP_POP(chr->parse_frommap_scdata_update, HP_chr_parse_frommap_scdata_update) }, { HP_POP(chr->parse_frommap_scdata_delete, HP_chr_parse_frommap_scdata_delete) }, { HP_POP(chr->parse_frommap, HP_chr_parse_frommap) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index fdec7feea26..a15eccc0cfc 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -2788,32 +2788,6 @@ void HP_chr_parse_frommap_update_ip(int fd, int id) { } return; } -void HP_chr_parse_frommap_request_stats_report(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.chr.parse_frommap_request_stats_report(fd); - } - if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_chr_parse_frommap_scdata_update(int fd) { int hIndex = 0; if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre > 0) { diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index cbfaf1b65a0..b976d960190 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -430,8 +430,6 @@ struct { struct HPMHookPoint *HP_chrif_divorce_post; struct HPMHookPoint *HP_chrif_removefriend_pre; struct HPMHookPoint *HP_chrif_removefriend_post; - struct HPMHookPoint *HP_chrif_send_report_pre; - struct HPMHookPoint *HP_chrif_send_report_post; struct HPMHookPoint *HP_chrif_flush_pre; struct HPMHookPoint *HP_chrif_flush_post; struct HPMHookPoint *HP_chrif_skillid2idx_pre; @@ -6749,8 +6747,6 @@ struct { int HP_chrif_divorce_post; int HP_chrif_removefriend_pre; int HP_chrif_removefriend_post; - int HP_chrif_send_report_pre; - int HP_chrif_send_report_post; int HP_chrif_flush_pre; int HP_chrif_flush_post; int HP_chrif_skillid2idx_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 5fdfd9e0307..19fd8498e0b 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -236,7 +236,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->changesex, HP_chrif_changesex) }, { HP_POP(chrif->divorce, HP_chrif_divorce) }, { HP_POP(chrif->removefriend, HP_chrif_removefriend) }, - { HP_POP(chrif->send_report, HP_chrif_send_report) }, { HP_POP(chrif->flush, HP_chrif_flush) }, { HP_POP(chrif->skillid2idx, HP_chrif_skillid2idx) }, { HP_POP(chrif->sd_to_auth, HP_chrif_sd_to_auth) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 02cf68bd287..007a1c004f8 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -5499,32 +5499,6 @@ bool HP_chrif_removefriend(int char_id, int friend_id) { } return retVal___; } -void HP_chrif_send_report(char *buf, int len) { - int hIndex = 0; - if (HPMHooks.count.HP_chrif_send_report_pre > 0) { - void (*preHookFunc) (char **buf, int *len); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_chrif_send_report_pre[hIndex].func; - preHookFunc(&buf, &len); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.chrif.send_report(buf, len); - } - if (HPMHooks.count.HP_chrif_send_report_post > 0) { - void (*postHookFunc) (char *buf, int len); - for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_chrif_send_report_post[hIndex].func; - postHookFunc(buf, len); - } - } - return; -} bool HP_chrif_flush(void) { int hIndex = 0; bool retVal___ = false;