summaryrefslogtreecommitdiff
path: root/modules/commands/ms_ignore.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/ms_ignore.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (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.cpp10
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);