bandb: Don't attempt to write to a NULL helper.

This commit is contained in:
Keith Buck 2014-01-12 01:38:48 +00:00
parent f70fb6379a
commit c8729b08fb

View file

@ -122,6 +122,9 @@ void
bandb_add(bandb_type type, struct Client *source_p, const char *mask1, bandb_add(bandb_type type, struct Client *source_p, const char *mask1,
const char *mask2, const char *reason, const char *oper_reason, int perm) const char *mask2, const char *reason, const char *oper_reason, int perm)
{ {
if(bandb_helper == NULL)
return;
static char buf[BUFSIZE]; static char buf[BUFSIZE];
rb_snprintf(buf, sizeof(buf), "%c %s ", bandb_add_letter[type], mask1); rb_snprintf(buf, sizeof(buf), "%c %s ", bandb_add_letter[type], mask1);
@ -145,6 +148,9 @@ static char bandb_del_letter[LAST_BANDB_TYPE] = {
void void
bandb_del(bandb_type type, const char *mask1, const char *mask2) bandb_del(bandb_type type, const char *mask1, const char *mask2)
{ {
if(bandb_helper == NULL)
return;
static char buf[BUFSIZE]; static char buf[BUFSIZE];
buf[0] = '\0'; buf[0] = '\0';