From e66063e6304538d34c40460ca0aa2be5ddb6bdec Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 5 Aug 2011 05:35:31 -0400 Subject: Rewrote the example configurations and split them up into seperate files for each pseudo client. Also reorganized how the modules are stored, and made most of the old "extra" modules "core" --- modules/pseudoclients/memoserv.h | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 modules/pseudoclients/memoserv.h (limited to 'modules/pseudoclients/memoserv.h') diff --git a/modules/pseudoclients/memoserv.h b/modules/pseudoclients/memoserv.h new file mode 100644 index 000000000..0bf0c79ca --- /dev/null +++ b/modules/pseudoclients/memoserv.h @@ -0,0 +1,41 @@ +#ifndef MEMOSERV_H +#define MEMOSERV_H + +class MemoServService : public Service +{ + public: + enum MemoResult + { + MEMO_SUCCESS, + MEMO_INVALID_TARGET, + MEMO_TOO_FAST, + MEMO_TARGET_FULL + }; + + MemoServService(Module *m) : Service(m, "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. + * @param message Memo text + * @param force true to force the memo, restrictions/delays etc are not checked + */ + virtual MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0; + + /** Check for new memos and notify the user if there are any + * @param u The user + */ + virtual void Check(User *u) = 0; +}; + +static service_reference memoserv("MemoServ"); + +#endif // MEMOSERV_H + -- cgit