summaryrefslogtreecommitdiff
path: root/modules/commands/ns_ajoin.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-19 20:54:55 -0500
committerAdam <Adam@anope.org>2012-02-19 20:54:55 -0500
commitb84e0804636d3868684c6ec2670207e7ae1cadeb (patch)
tree059be9a9da7b530970bc44f2c8eee5f61497a82e /modules/commands/ns_ajoin.cpp
parent0ba58d7d0eea4e2a0e0d18a66880f84af6fea60e (diff)
Made our message sources actual clients/servers, and put in a few more default messages for very standard things (KICK etc)
Diffstat (limited to 'modules/commands/ns_ajoin.cpp')
-rw-r--r--modules/commands/ns_ajoin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 5a5dbe7f0..03b710356 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -194,8 +194,9 @@ class NSAJoin : public Module
void OnNickIdentify(User *u) anope_override
{
AJoinList *channels = u->Account()->GetExt<AJoinList *>("ns_ajoin_channels");
+ BotInfo *bi = findbot(Config->NickServ);
- if (channels == NULL)
+ if (channels == NULL || bi == NULL)
return;
for (unsigned i = 0; i < channels->size(); ++i)
@@ -255,15 +256,14 @@ class NSAJoin : public Module
}
}
- if (need_invite)
+ if (need_invite && c != NULL)
{
- BotInfo *bi = findbot(Config->NickServ);
- if (!bi || !ci->AccessFor(u).HasPriv("INVITE"))
+ if (!ci->AccessFor(u).HasPriv("INVITE"))
continue;
- ircdproto->SendInvite(bi, channels->at(i).first, u->nick);
+ ircdproto->SendInvite(bi, c, u);
}
- ircdproto->SendSVSJoin(Config->NickServ, u->nick, channels->at(i).first, key);
+ ircdproto->SendSVSJoin(bi, u->nick, channels->at(i).first, key);
}
}
};