diff options
author | Adam <Adam@anope.org> | 2014-05-28 12:07:29 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-28 12:07:54 -0400 |
commit | f29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch) | |
tree | 3c33db276dc9328235bbd572641521ed44458176 /modules/commands/ms_ignore.cpp | |
parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/ms_ignore.cpp')
-rw-r--r-- | modules/commands/ms_ignore.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp index f73a27930..98b4a2f9e 100644 --- a/modules/commands/ms_ignore.cpp +++ b/modules/commands/ms_ignore.cpp @@ -29,6 +29,8 @@ class CommandMSIgnore : public Command source.Reply(READ_ONLY_MODE); return; } + if (!MemoServ::service) + return; Anope::string channel = params[0]; Anope::string command = (params.size() > 1 ? params[1] : ""); @@ -41,10 +43,10 @@ class CommandMSIgnore : public Command channel = source.GetNick(); } - bool ischan; - MemoInfo *mi = MemoInfo::GetMemoInfo(channel, ischan); - ChannelInfo *ci = ChannelInfo::Find(channel); - if (!mi) + bool ischan, isregistered; + MemoServ::MemoInfo *mi = MemoServ::service->GetMemoInfo(channel, ischan, isregistered, true); + ChanServ::Channel *ci = ChanServ::Find(channel); + if (!isregistered) source.Reply(ischan ? CHAN_X_NOT_REGISTERED : _(NICK_X_NOT_REGISTERED), channel.c_str()); else if (ischan && !source.AccessFor(ci).HasPriv("MEMO")) source.Reply(ACCESS_DENIED); |