Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 125b387

Browse files
committed
fix "facilty (null) requires hexip"
1 parent 060f0d1 commit 125b387

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

facilities.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void facility_newuser(hook_user_nick_t *data)
325325
int blocked = 0, throttled = 0, blacklisted = 0, cloak_override = 0;
326326
char *blockmessage = NULL, *throttlemessage = NULL;
327327
facility_cloak_type cloak = facility_cloak_none;
328-
facility_t *blocking_facility = NULL, *throttling_facility = NULL;
328+
facility_t *blocking_facility = NULL, *throttling_facility = NULL, *cloaking_facility = NULL;
329329
char *blocking_regex = NULL;
330330

331331
int dospam = 0;
@@ -366,7 +366,10 @@ void facility_newuser(hook_user_nick_t *data)
366366
}
367367

368368
if (f->cloaking != facility_cloak_undefined)
369+
{
369370
cloak = f->cloaking;
371+
cloaking_facility = f;
372+
}
370373

371374
if (f->cloak_override)
372375
cloak_override = f->cloak_override;
@@ -471,7 +474,7 @@ void facility_newuser(hook_user_nick_t *data)
471474
else
472475
{
473476
syn_report("Killing user %s; facility %s requires hexip but none was found",
474-
u->nick, blocking_facility->hostpart);
477+
u->nick, cloaking_facility->hostpart);
475478
// If we couldn't decode an IP, block the connection
476479
syn_kill2(u, "No IP address supplied", "Your gateway requires an underlying IP address to be supplied, which could not be found.");
477480
data->u = NULL;

0 commit comments

Comments
 (0)