summaryrefslogtreecommitdiff
path: root/include/modules/memoserv
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-08 12:22:07 +0000
committerSadie Powell <sadie@witchery.services>2025-03-08 12:22:07 +0000
commitdf0cd3ef3e9a5cd1230aebdb45569f54512373ad (patch)
tree3abf54908e7aac069da940f1d6db85829a46b302 /include/modules/memoserv
parent9e37a643f13a8e6b5b8468f245f21fd23238f058 (diff)
Move some headers around.
Diffstat (limited to 'include/modules/memoserv')
-rw-r--r--include/modules/memoserv/service.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/modules/memoserv/service.h b/include/modules/memoserv/service.h
new file mode 100644
index 000000000..c1ff4af7d
--- /dev/null
+++ b/include/modules/memoserv/service.h
@@ -0,0 +1,39 @@
+/*
+ *
+ * (C) 2011-2025 Anope Team
+ * Contact us at team@anope.org
+ *
+ * Please read COPYING and README for further details.
+ */
+
+#pragma once
+
+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 anything.
+ * @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;
+};