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_rsend.cpp | |
parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/ms_rsend.cpp')
-rw-r--r-- | modules/commands/ms_rsend.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index 4cdeb132b..98315845c 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -34,10 +34,10 @@ class CommandMSRSend : public Command const Anope::string &nick = params[0]; const Anope::string &text = params[1]; - const NickAlias *na = NULL; + const NickServ::Nick *na = NULL; /* prevent user from rsend to themselves */ - if ((na = NickAlias::Find(nick)) && na->nc == source.GetAccount()) + if ((na = NickServ::FindNick(nick)) && na->nc == source.GetAccount()) { source.Reply(_("You can not request a receipt when sending a memo to yourself.")); return; @@ -54,15 +54,15 @@ class CommandMSRSend : public Command source.Reply(_("Please wait %d seconds before using the %s command again."), Config->GetModule("memoserv")->Get<time_t>("senddelay"), source.command.c_str()); else if (result == MemoServ::MemoServService::MEMO_TARGET_FULL) source.Reply(_("Sorry, %s currently has too many memos and cannot receive more."), nick.c_str()); - else + else { source.Reply(_("Memo sent to \002%s\002."), nick.c_str()); - bool ischan; - MemoInfo *mi = MemoInfo::GetMemoInfo(nick, ischan); + bool ischan, isregistered; + MemoServ::MemoInfo *mi = MemoServ::service->GetMemoInfo(nick, ischan, isregistered, false); if (mi == NULL) throw CoreException("NULL mi in ms_rsend"); - Memo *m = (mi->memos->size() ? mi->GetMemo(mi->memos->size() - 1) : NULL); + MemoServ::Memo *m = (mi->memos->size() ? mi->GetMemo(mi->memos->size() - 1) : NULL); if (m != NULL) m->receipt = true; } |