summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_invite.cpp2
-rw-r--r--modules/commands/ns_ajoin.cpp12
-rw-r--r--modules/commands/os_oline.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp
index b38828c9d..be3132907 100644
--- a/modules/commands/cs_invite.cpp
+++ b/modules/commands/cs_invite.cpp
@@ -71,7 +71,7 @@ class CommandCSInvite : public Command
{
bool override = !ci->AccessFor(u).HasPriv("INVITE");
- ircdproto->SendInvite(ci->WhoSends(), chan, u2->nick);
+ ircdproto->SendInvite(ci->WhoSends(), c, u2);
if (u2 != u)
{
source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str());
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);
}
}
};
diff --git a/modules/commands/os_oline.cpp b/modules/commands/os_oline.cpp
index 5992f296e..3076da434 100644
--- a/modules/commands/os_oline.cpp
+++ b/modules/commands/os_oline.cpp
@@ -34,7 +34,7 @@ class CommandOSOLine : public Command
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
else if (u2 && flag[0] == '+')
{
- ircdproto->SendSVSO(Config->OperServ, nick, flag);
+ ircdproto->SendSVSO(source.owner, nick, flag);
u2->SetMode(source.owner, UMODE_OPER);
u2->SendMessage(source.owner, _("You are now an IRC Operator."));
source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str());
@@ -42,7 +42,7 @@ class CommandOSOLine : public Command
}
else if (u2 && flag[0] == '-')
{
- ircdproto->SendSVSO(Config->OperServ, nick, flag);
+ ircdproto->SendSVSO(source.owner, nick, flag);
source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str());
Log(LOG_ADMIN, u, this) << "for " << nick;
}