]> jfr.im git - solanum.git/blobdiff - include/channel.h
Move flood_attack_channel to channel.c so it can be used outside m_message.c
[solanum.git] / include / channel.h
index 12d6196d732075dd38247c321e83ad23f1012732..6e4f70d931dfa7a6877e5ea5b05eee81a22abec0 100644 (file)
@@ -26,8 +26,6 @@
 
 #ifndef INCLUDED_channel_h
 #define INCLUDED_channel_h
-#include "config.h"            /* config settings */
-#include "ircd_defs.h"         /* buffer sizes */
 
 #define MODEBUFLEN      200
 
@@ -53,6 +51,7 @@ struct Channel
 {
        rb_dlink_node node;
        struct Mode mode;
+       char *mode_lock;
        char *topic;
        char *topic_info;
        time_t topic_time;
@@ -61,7 +60,7 @@ struct Channel
        rb_dlink_list members;  /* channel members */
        rb_dlink_list locmembers;       /* local channel members */
 
-       rb_dlink_list invites;
+rb_dlink_list invites;
        rb_dlink_list banlist;
        rb_dlink_list exceptlist;
        rb_dlink_list invexlist;
@@ -126,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;
 };
 
@@ -144,8 +145,9 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
 
 /* channel status flags */
 #define CHFL_PEON              0x0000  /* normal member of channel */
-#define CHFL_CHANOP            0x0001  /* Channel operator */
-#define CHFL_VOICE             0x0002  /* the power to speak */
+#define CHFL_VOICE             0x0001  /* the power to speak */
+#define CHFL_CHANOP            0x0002  /* Channel operator */
+
 #define CHFL_BANNED            0x0008  /* cached as banned */
 #define CHFL_QUIETED           0x0010  /* cached as being +q victim */
 #define ONLY_SERVERS           0x0020
@@ -173,6 +175,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 */
@@ -215,6 +218,8 @@ extern void destroy_channel(struct Channel *);
 
 extern int can_send(struct Channel *chptr, struct Client *who, 
                    struct membership *);
+extern int flood_attack_channel(int p_or_n, struct Client *source_p,
+                               struct Channel *chptr, char *chname);
 extern int is_banned(struct Channel *chptr, struct Client *who,
                     struct membership *msptr, const char *, const char *);
 extern int is_quieted(struct Channel *chptr, struct Client *who,
@@ -254,10 +259,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 int chmode_flags[256];
+extern void set_channel_mlock(struct Client *client_p, struct Client *source_p,
+               struct Channel *chptr, const char *newmlock, int propagate);
 
 extern struct ChannelMode chmode_table[256];
 
@@ -272,5 +279,6 @@ extern int match_extban(const char *banstr, struct Client *client_p, struct Chan
 extern int valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type);
 const char * get_extban_string(void);
 
+extern int get_channel_access(struct Client *source_p, struct membership *msptr);
 
 #endif /* INCLUDED_channel_h */