From 3fabc2f831c79f60c791fec632a8f916ab0c504a Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 29 Aug 2013 23:13:29 -0400 Subject: Fix ns_ajoin on unregisterd +i channels --- modules/commands/ns_ajoin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 6566dded6..3d30b84d8 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -262,11 +262,13 @@ class NSAJoin : public Module bool need_invite = false; Anope::string key = entry->key; + AccessGroup u_access; if (ci != NULL) { if (ci->HasExt("CS_SUSPENDED")) continue; + u_access = ci->AccessFor(u); } if (c != NULL) { @@ -288,7 +290,7 @@ class NSAJoin : public Module Anope::string k; if (c->GetParam("KEY", k)) { - if (ci->AccessFor(u).HasPriv("GETKEY")) + if (u_access.HasPriv("GETKEY")) key = k; else if (key != k) need_invite = true; @@ -312,7 +314,7 @@ class NSAJoin : public Module if (need_invite && c != NULL) { - if (!ci->AccessFor(u).HasPriv("INVITE")) + if (!u_access.HasPriv("INVITE")) continue; IRCD->SendInvite(NickServ, c, u); } -- cgit