From b84e0804636d3868684c6ec2670207e7ae1cadeb Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 19 Feb 2012 20:54:55 -0500 Subject: Made our message sources actual clients/servers, and put in a few more default messages for very standard things (KICK etc) --- modules/commands/ns_ajoin.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/commands/ns_ajoin.cpp') 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("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); } } }; -- cgit