summaryrefslogtreecommitdiff
path: root/include/modules/memoserv.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 03:30:08 -0400
committerAdam <Adam@anope.org>2013-05-05 03:30:08 -0400
commit57c2b65f08c9c0658003a74a32c6506829e12b0b (patch)
tree49883b790ed9f7cd395e0c6f2f62cc946d743635 /include/modules/memoserv.h
parenta118946e657b8a137502ff60c1f21c608cb44495 (diff)
Move module header files to include/modules to fix naming conflicts with system headers
Diffstat (limited to 'include/modules/memoserv.h')
-rw-r--r--include/modules/memoserv.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/modules/memoserv.h b/include/modules/memoserv.h
new file mode 100644
index 000000000..d35d3f8a0
--- /dev/null
+++ b/include/modules/memoserv.h
@@ -0,0 +1,34 @@
+#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
+