From 402b21d47a53cf7c8cb5fe37193a71cde03d374c Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 26 Jun 2020 15:34:22 -0600 Subject: [PATCH] regonlymsg: use hdata.error where available --- modules/um_regonlymsg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/um_regonlymsg.c b/modules/um_regonlymsg.c index 224a4690..3b31006a 100644 --- a/modules/um_regonlymsg.c +++ b/modules/um_regonlymsg.c @@ -100,6 +100,7 @@ h_hdl_invite(void *vdata) hook_data_channel_approval *data = vdata; struct Client *source_p = data->client; struct Client *target_p = data->target; + static char errorbuf[BUFSIZE]; if (data->approved) return; @@ -107,10 +108,11 @@ h_hdl_invite(void *vdata) if (allow_message(source_p, target_p)) return; - sendto_one_numeric(source_p, ERR_NONONREG, form_str(ERR_NONONREG), - target_p->name); + snprintf(errorbuf, sizeof errorbuf, form_str(ERR_NONONREG), + target_p->name); data->approved = ERR_NONONREG; + data->error = errorbuf; } static void