summaryrefslogtreecommitdiff
path: root/modules/commands/cs_register.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /modules/commands/cs_register.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/cs_register.cpp')
-rw-r--r--modules/commands/cs_register.cpp8
1 files changed, 5 insertions, 3 deletions
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<unsigned>("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;