diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/ns_ajoin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |
