#include "numeric.h"
#include "privilege.h"
#include "s_newconf.h"
+#include "logger.h"
static int
um_regonlymsg_modinit(void)
user_modes['R'] = find_umode_slot();
construct_umodebuf();
+ if (!user_modes['R'])
+ {
+ ierror("um_regonlymsg: unable to allocate usermode slot for +R, unloading module");
+ return -1;
+ }
+
return 0;
}
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;
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