]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
regonlymsg: use hdata.error where available
authorAriadne Conill <redacted>
Fri, 26 Jun 2020 21:34:22 +0000 (15:34 -0600)
committerAriadne Conill <redacted>
Fri, 26 Jun 2020 21:36:12 +0000 (15:36 -0600)
modules/um_regonlymsg.c

index 224a4690a615cc19c1cac6a7b3c6edc44ead6e7f..3b31006a3b665a6d349158b11c383aa6b0741875 100644 (file)
@@ -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