summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-08-29 23:13:29 -0400
committerAdam <Adam@anope.org>2013-08-29 23:13:29 -0400
commit3fabc2f831c79f60c791fec632a8f916ab0c504a (patch)
tree78deca9ee2702d6404d198977deeaf9c7edc93ef /modules/commands
parent59ea36c831796aaa29427e9645e4eb56185b04f3 (diff)
Fix ns_ajoin on unregisterd +i channels
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/ns_ajoin.cpp6
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);
}