]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
callerid: use hdata.error where available
authorAriadne Conill <redacted>
Fri, 26 Jun 2020 21:40:03 +0000 (15:40 -0600)
committerAriadne Conill <redacted>
Thu, 9 Jul 2020 22:06:33 +0000 (16:06 -0600)
modules/um_callerid.c

index f483dd4753b28116e4b07949b9b3aad046e59100..1e8a7423195ae74af0b2729049be68e5744752b6 100644 (file)
@@ -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