I made this plugin so I can bring in a pull request to my server. It compiles fine and the server starts as well. However, the plugin actually breaks the server and makes it so I can't login. I know the code is fine as I tested by adding to clif.c before making it plugin form.
How can I fix it?
Thank you.
bool clif_send_pre(const void **buf, int *len, struct block_list **bl, enum send_target *type)
{
struct map_session_data *sd;
if (*type != ALL_CLIENT)
nullpo_ret(*bl);
sd = BL_CAST(BL_PC, *bl);
// Hide Area Packets from hidden players https://github.com/HerculesWS/Hercules/pull/1200
if (sd != NULL && pc_isinvisible(sd))
{
if (*type == AREA || *type == BG || *type == BG_AREA)
*type = SELF;
else if (*type == AREA_WOS || *type == BG_WOS || *type == BG_AREA_WOS)
hookStop();
return true;
}
hookStop();
return true;
}
/* run when server starts */
HPExport void plugin_init (void)
{
addHookPre(clif, send, clif_send_pre);
}
Hello!
I made this plugin so I can bring in a pull request to my server. It compiles fine and the server starts as well. However, the plugin actually breaks the server and makes it so I can't login. I know the code is fine as I tested by adding to clif.c before making it plugin form.
Edited by MyriadHow can I fix it?
Thank you.
Share this post
Link to post
Share on other sites