summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/ns_ajoin.cpp5
-rw-r--r--modules/commands/ns_recover.cpp4
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 54e37ad36..ce92582f6 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -233,6 +233,9 @@ class NSAJoin : public Module
{
this->SetAuthor("Anope");
+ if (!IRCD->CanSVSJoin)
+ throw ModuleException("Your IRCd does not support SVSJOIN");
+
Implementation i[] = { I_OnNickIdentify };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
@@ -317,7 +320,7 @@ class NSAJoin : public Module
IRCD->SendInvite(NickServ, c, u);
}
- IRCD->SendSVSJoin(NickServ, u->nick, entry->channel, key);
+ IRCD->SendSVSJoin(NickServ, u, entry->channel, key);
}
}
};
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp
index 287224a1b..419857eee 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/commands/ns_recover.cpp
@@ -243,8 +243,8 @@ class NSRecover : public Module
/* User might already be on the channel */
if (u->FindChannel(c))
this->OnJoinChannel(u, c);
- else
- IRCD->SendSVSJoin(NickServ, u->GetUID(), cname, "");
+ else if (IRCD->CanSVSJoin)
+ IRCD->SendSVSJoin(NickServ, u, cname, "");
}
}
}