aboutsummaryrefslogtreecommitdiff
path: root/include/modules/invite.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-04-07 20:00:52 +0100
committerGravatar Sadie Powell2022-04-07 20:00:52 +0100
commit7385ceccb109b7aca09efdaa83b4b627eab81da9 (patch)
tree535aa23140ccc220fd2765ef40d6effa473f18d4 /include/modules/invite.h
parentGnuTLS DH parameters are optional from 3.6.0+ not 3.5.6+. (diff)
Expose the invite announcement level to modules.
Diffstat (limited to 'include/modules/invite.h')
-rw-r--r--include/modules/invite.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/modules/invite.h b/include/modules/invite.h
index ba76f577e..20d06e3fb 100644
--- a/include/modules/invite.h
+++ b/include/modules/invite.h
@@ -26,6 +26,23 @@ namespace Invite
class API;
class Invite;
+
+ /** Used to indicate who we announce invites to on a channel. */
+ enum AnnounceState
+ {
+ /** Don't send invite announcements. */
+ ANNOUNCE_NONE,
+
+ /** Send invite announcements to all users. */
+ ANNOUNCE_ALL,
+
+ /** Send invite announcements to channel operators and higher. */
+ ANNOUNCE_OPS,
+
+ /** Send invite announcements to channel half-operators (if available) and higher. */
+ ANNOUNCE_DYNAMIC
+ };
+
typedef insp::intrusive_list<Invite, LocalUser> List;
}
@@ -51,6 +68,9 @@ class Invite::APIBase : public DataProvider
*/
virtual Invite* Find(LocalUser* user, Channel* chan) = 0;
+ /** Returns the announcement behaviour for invites from <security:announceinvites>. */
+ virtual AnnounceState GetAnnounceState() const = 0;
+
/** Returns the list of channels a user has been invited to but has not yet joined.
* @param user User whose invite list to retrieve
* @return List of channels the user is invited to or NULL if the list is empty