regonlymsg: use hdata.error where available
This commit is contained in:
parent
2bbfce681f
commit
402b21d47a
1 changed files with 4 additions and 2 deletions
|
@ -100,6 +100,7 @@ h_hdl_invite(void *vdata)
|
||||||
hook_data_channel_approval *data = vdata;
|
hook_data_channel_approval *data = vdata;
|
||||||
struct Client *source_p = data->client;
|
struct Client *source_p = data->client;
|
||||||
struct Client *target_p = data->target;
|
struct Client *target_p = data->target;
|
||||||
|
static char errorbuf[BUFSIZE];
|
||||||
|
|
||||||
if (data->approved)
|
if (data->approved)
|
||||||
return;
|
return;
|
||||||
|
@ -107,10 +108,11 @@ h_hdl_invite(void *vdata)
|
||||||
if (allow_message(source_p, target_p))
|
if (allow_message(source_p, target_p))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sendto_one_numeric(source_p, ERR_NONONREG, form_str(ERR_NONONREG),
|
snprintf(errorbuf, sizeof errorbuf, form_str(ERR_NONONREG),
|
||||||
target_p->name);
|
target_p->name);
|
||||||
|
|
||||||
data->approved = ERR_NONONREG;
|
data->approved = ERR_NONONREG;
|
||||||
|
data->error = errorbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue