From 8a6962fc363410928dc8d7c197fd3fbf3e315597 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 26 Nov 2012 22:57:51 -0500 Subject: Keep track on what ircds we can svsjoin, add an svspart method --- modules/commands/ns_ajoin.cpp | 5 ++++- modules/commands/ns_recover.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/commands') 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, ""); } } } -- cgit