From c6edf6541145d22df3cf3bece1d72881ae69699e Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 26 Jun 2020 15:40:03 -0600 Subject: [PATCH] callerid: use hdata.error where available --- modules/um_callerid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/um_callerid.c b/modules/um_callerid.c index f483dd47..1e8a7423 100644 --- a/modules/um_callerid.c +++ b/modules/um_callerid.c @@ -187,6 +187,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; @@ -200,9 +201,11 @@ h_hdl_invite(void *vdata) if (allow_message(source_p, target_p)) return; - send_callerid_notice(MESSAGE_TYPE_PRIVMSG, source_p, target_p); + snprintf(errorbuf, sizeof errorbuf, form_str(ERR_TARGUMODEG), + target_p->name); data->approved = ERR_TARGUMODEG; + data->error = errorbuf; } static void