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_del.cpp | |
parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/ms_del.cpp')
-rw-r--r-- | modules/commands/ms_del.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp index e1d329921..9089dd6a1 100644 --- a/modules/commands/ms_del.cpp +++ b/modules/commands/ms_del.cpp @@ -15,10 +15,10 @@ class MemoDelCallback : public NumberList { CommandSource &source; - ChannelInfo *ci; - MemoInfo *mi; + ChanServ::Channel *ci; + MemoServ::MemoInfo *mi; public: - MemoDelCallback(CommandSource &_source, ChannelInfo *_ci, MemoInfo *_mi, const Anope::string &list) : NumberList(list, true), source(_source), ci(_ci), mi(_mi) + MemoDelCallback(CommandSource &_source, ChanServ::Channel *_ci, MemoServ::MemoInfo *_mi, const Anope::string &list) : NumberList(list, true), source(_source), ci(_ci), mi(_mi) { } @@ -52,8 +52,8 @@ class CommandMSDel : public Command return; } - MemoInfo *mi; - ChannelInfo *ci = NULL; + MemoServ::MemoInfo *mi; + ChanServ::Channel *ci = NULL; Anope::string numstr = !params.empty() ? params[0] : "", chan; if (!numstr.empty() && numstr[0] == '#') @@ -61,7 +61,7 @@ class CommandMSDel : public Command chan = numstr; numstr = params.size() > 1 ? params[1] : ""; - ci = ChannelInfo::Find(chan); + ci = ChanServ::Find(chan); if (!ci) { source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str()); @@ -72,13 +72,13 @@ class CommandMSDel : public Command source.Reply(ACCESS_DENIED); return; } - mi = &ci->memos; + mi = ci->memos; } else - mi = &source.nc->memos; + mi = source.nc->memos; if (numstr.empty() || (!isdigit(numstr[0]) && !numstr.equals_ci("ALL") && !numstr.equals_ci("LAST"))) this->OnSyntaxError(source, numstr); - else if (mi->memos->empty()) + else if (!mi || mi->memos->empty()) { if (!chan.empty()) source.Reply(MEMO_X_HAS_NO_MEMOS, chan.c_str()); |