diff options
Diffstat (limited to 'modules/pseudoclients')
| -rw-r--r-- | modules/pseudoclients/memoserv.cpp | 22 | ||||
| -rw-r--r-- | modules/pseudoclients/memoserv.h | 7 |
2 files changed, 1 insertions, 28 deletions
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp index 17aaaa308..ca54f3378 100644 --- a/modules/pseudoclients/memoserv.cpp +++ b/modules/pseudoclients/memoserv.cpp @@ -39,30 +39,10 @@ class MyMemoServService : public MemoServService public: MyMemoServService(Module *m) : MemoServService(m) { } - MemoInfo *GetMemoInfo(const Anope::string &target, bool &ischan) anope_override - { - if (!target.empty() && target[0] == '#') - { - ischan = true; - ChannelInfo *ci = ChannelInfo::Find(target); - if (ci != NULL) - return &ci->memos; - } - else - { - ischan = false; - NickAlias *na = NickAlias::Find(target); - if (na != NULL) - return &na->nc->memos; - } - - return NULL; - } - MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) anope_override { bool ischan; - MemoInfo *mi = this->GetMemoInfo(target, ischan); + MemoInfo *mi = MemoInfo::GetMemoInfo(target, ischan); if (mi == NULL) return MEMO_INVALID_TARGET; diff --git a/modules/pseudoclients/memoserv.h b/modules/pseudoclients/memoserv.h index e314c7208..71ca064de 100644 --- a/modules/pseudoclients/memoserv.h +++ b/modules/pseudoclients/memoserv.h @@ -14,13 +14,6 @@ class MemoServService : public Service MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") { } - /** Retrieve the memo info for a nick or channel - * @param target Target - * @param ischan Set to true if target is a channel - * @return A memoinfo structure or NULL - */ - virtual MemoInfo *GetMemoInfo(const Anope::string &target, bool &ischan) = 0; - /** Sends a memo. * @param source The source of the memo, can be anythin. * @param target The target of the memo, nick or channel. |
