From f29e1cf383529a1a29f02b0669d973f5ee0b7a66 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 May 2014 12:07:29 -0400 Subject: Move most of the core pseudoclient logic to modules --- modules/commands/cs_register.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/commands/cs_register.cpp') diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index 7b2899939..4e584b51c 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -27,9 +27,9 @@ class CommandCSRegister : public Command unsigned maxregistered = Config->GetModule("chanserv")->Get("maxregistered"); User *u = source.GetUser(); - NickCore *nc = source.nc; + NickServ::Account *nc = source.nc; Channel *c = Channel::Find(params[0]); - ChannelInfo *ci = ChannelInfo::Find(params[0]); + ChanServ::Channel *ci = ChanServ::Find(params[0]); if (Anope::ReadOnly) source.Reply(_("Sorry, channel registration is temporarily disabled.")); @@ -51,7 +51,9 @@ class CommandCSRegister : public Command source.Reply(nc->channelcount > maxregistered ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, maxregistered); else { - ci = new ChannelInfo(chan); + if (!ChanServ::service) + return; + ci = ChanServ::service->Create(chan); ci->SetFounder(nc); ci->desc = chdesc; -- cgit