summaryrefslogtreecommitdiff
path: root/modules/commands/os_forbid.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
committerAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
commit22658d63bdb1e52a66f4514af45fa55ca5891345 (patch)
tree673304ab19f7e077b489354248247867518331f8 /modules/commands/os_forbid.cpp
parentf2dee1e1d642b07947f59f91dfba9af34ef84685 (diff)
Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Diffstat (limited to 'modules/commands/os_forbid.cpp')
-rw-r--r--modules/commands/os_forbid.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp
index c7c147c7e..a56d08219 100644
--- a/modules/commands/os_forbid.cpp
+++ b/modules/commands/os_forbid.cpp
@@ -9,11 +9,11 @@
* Based on the original code of Services by Andy Church.
*/
-/*************************************************************************/
-
#include "module.h"
#include "modules/os_forbid.h"
+static ServiceReference<NickServService> nickserv("NickServService", "NickServ");
+
class MyForbidService : public ForbidService
{
Serialize::Checker<std::vector<ForbidData *>[FT_SIZE - 1]> forbid_data;
@@ -271,6 +271,7 @@ class OSForbid : public Module
ForbidData *d = this->forbidService.FindForbid(u->nick, FT_NICK);
if (d != NULL)
{
+ BotInfo *OperServ = Config->GetClient("OperServ");
if (OperServ)
{
if (d->reason.empty())
@@ -278,12 +279,14 @@ class OSForbid : public Module
else
u->SendMessage(OperServ, _("This nickname has been forbidden: %s"), d->reason.c_str());
}
- u->Collide(NULL);
+ if (nickserv)
+ nickserv->Collide(u, NULL);
}
}
void OnJoinChannel(User *u, Channel *c) anope_override
{
+ BotInfo *OperServ = Config->GetClient("OperServ");
if (u->HasMode("OPER") || !OperServ)
return;