summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/memoserv.h
blob: 71ca064de173df0dce32a032a424854655e71e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#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, "MemoServService", "MemoServ") { }

	/** 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;
};

#endif // MEMOSERV_H