]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - include/channel.h
Add blank +K (norepeat) chmode, though it does nothing yet.
[irc/rqf/shadowircd.git] / include / channel.h
index 93001a3ca0a3417d091b66a48f025fc5ff429ab3..164abe511472a500d29a59eb649da541df36c67d 100644 (file)
@@ -147,13 +147,16 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
 #define CHFL_BANNED            0x0008  /* cached as banned */
 #define CHFL_QUIETED           0x0010  /* cached as being +q victim */
 #define ONLY_SERVERS           0x0020
+#define CHFL_HALFOP            0x0040
+#define CHFL_OWNER             0x0080
 #define ALL_MEMBERS            CHFL_PEON
 #define ONLY_CHANOPS           CHFL_CHANOP
 #define ONLY_CHANOPSVOICED     (CHFL_CHANOP|CHFL_VOICE)
 
+#define is_chmode_h(x) ((x) && (x)->flags & CHFL_HALFOP) /* does not check if halfop is enabled, should typically not be used */
+#define is_chmode_a(x) ((x) && (x)->flags & CHFL_OWNER) /* does not check if owner is enabled, should typically not be used */
 #define is_chanop(x)   ((x) && (x)->flags & CHFL_CHANOP)
 #define is_voiced(x)   ((x) && (x)->flags & CHFL_VOICE)
-#define is_chanop_voiced(x) ((x) && (x)->flags & (CHFL_CHANOP|CHFL_VOICE))
 #define can_send_banned(x) ((x) && (x)->flags & (CHFL_BANNED|CHFL_QUIETED))
 
 /* channel modes ONLY */
@@ -177,6 +180,8 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
 #define MODE_NOKICK    0x64000 /* Disable /kick on this channel */
 #define MODE_NONICK    0x128000 /* Disable /nick for anyone on this channel */
 #define MODE_NOCAPS    0x256000 /* Block messages in all capital letters */
+#define MODE_NOREJOIN  0x512000 /* Block rejoin immediately after kick */
+#define MODE_NOREPEAT  0x1024000 /* Block repeat messages */
 
 #define CHFL_BAN        0x10000000     /* ban channel flag */
 #define CHFL_EXCEPTION  0x20000000     /* exception to ban channel flag */
@@ -227,6 +232,11 @@ extern int can_join(struct Client *source_p, struct Channel *chptr, char *key);
 
 extern struct membership *find_channel_membership(struct Channel *, struct Client *);
 extern const char *find_channel_status(struct membership *msptr, int combine);
+extern int is_halfop(struct membership *msptr);
+extern int is_owner(struct membership *msptr);
+extern int is_any_op(struct membership *msptr);
+extern int is_chanop_voiced(struct membership *msptr);
+extern int can_kick_deop(struct membership *source, struct membership *target);
 extern void add_user_to_channel(struct Channel *, struct Client *, int flags);
 extern void remove_user_from_channel(struct membership *);
 extern void remove_user_from_channels(struct Client *);