]> jfr.im git - solanum.git/blobdiff - include/channel.h
Branch merge
[solanum.git] / include / channel.h
index b4da1b6edaeabe353cf979295f693e56317df4c1..b7a80f4f007d344432d48eafccd7de228f26deeb 100644 (file)
@@ -51,6 +51,7 @@ struct Channel
 {
        rb_dlink_node node;
        struct Mode mode;
+       char *mode_lock;
        char *topic;
        char *topic_info;
        time_t topic_time;
@@ -124,11 +125,13 @@ struct ChCapCombo
        int cap_no;
 };
 
+typedef void (*ChannelModeFunc)(struct Client *source_p, struct Channel *chptr,
+               int alevel, int parc, int *parn,
+               const char **parv, int *errors, int dir, char c, long mode_type);
+
 struct ChannelMode
 {
-       void (*set_func) (struct Client * source_p, struct Channel * chptr,
-                     int alevel, int parc, int *parn,
-                     const char **parv, int *errors, int dir, char c, long mode_type);
+       ChannelModeFunc set_func;
        long mode_type;
 };
 
@@ -171,6 +174,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
 #define MODE_FREEINVITE 0x0800  /* allow free use of /invite */
 #define MODE_FREETARGET 0x1000  /* can be forwarded to without authorization */
 #define MODE_DISFORWARD 0x2000  /* disable channel forwarding */
+#define MODE_NOCTCP     0x8000  /* Block CTCPs directed to this channel */
 
 #define CHFL_BAN        0x10000000     /* ban channel flag */
 #define CHFL_EXCEPTION  0x20000000     /* exception to ban channel flag */
@@ -235,7 +239,9 @@ extern void channel_member_names(struct Channel *chptr, struct Client *,
 
 extern void del_invite(struct Channel *chptr, struct Client *who);
 
-const char *channel_modes(struct Channel *chptr, struct Client *who);
+const char *channel_modes_real(struct Channel *chptr, struct Mode *mode, struct Client *who);
+#define channel_modes(chptr, who)      channel_modes_real(chptr, &(chptr)->mode, who)
+#define channel_mlock(chptr, who)      channel_modes_real(chptr, &(chptr)->mode_lock, who)
 
 extern struct Channel *find_bannickchange_channel(struct Client *client_p);
 
@@ -252,8 +258,12 @@ extern void unset_chcap_usage_counts(struct Client *serv_p);
 extern void send_cap_mode_changes(struct Client *client_p, struct Client *source_p,
                                  struct Channel *chptr, struct ChModeChange foo[], int);
 
+void resv_chan_forcepart(const char *name, const char *reason, int temp_time);
+
 extern void set_channel_mode(struct Client *client_p, struct Client *source_p,
                struct Channel *chptr, struct membership *msptr, int parc, const char *parv[]);
+extern void set_channel_mlock(struct Client *client_p, struct Client *source_p,
+               struct Channel *chptr, const char *newmlock);
 
 extern struct ChannelMode chmode_table[256];