]> jfr.im git - solanum.git/blobdiff - include/channel.h
Add away-notify client capability.
[solanum.git] / include / channel.h
index 923871ed2f7217bc49ed599e5571827cf34c219b..9178718bf8feca97e3a504ffb729a77969265f1a 100644 (file)
@@ -39,7 +39,6 @@ struct Client;
 struct Mode
 {
        unsigned int mode;
-       unsigned int off_mode;
        int limit;
        char key[KEYLEN];
        unsigned int join_num;
@@ -52,7 +51,7 @@ struct Channel
 {
        rb_dlink_node node;
        struct Mode mode;
-       struct Mode mode_lock;
+       char *mode_lock;
        char *topic;
        char *topic_info;
        time_t topic_time;
@@ -98,6 +97,7 @@ struct Ban
        char *banstr;
        char *who;
        time_t when;
+       char *forward;
        rb_dlink_node node;
 };
 
@@ -146,8 +146,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
@@ -210,7 +211,7 @@ void init_channels(void);
 
 struct Channel *allocate_channel(const char *chname);
 void free_channel(struct Channel *chptr);
-struct Ban *allocate_ban(const char *, const char *);
+struct Ban *allocate_ban(const char *, const char *, const char *);
 void free_ban(struct Ban *bptr);
 
 
@@ -218,11 +219,14 @@ 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 *);
+                   struct membership *msptr, const char *, const char *, const char **);
 extern int is_quieted(struct Channel *chptr, struct Client *who,
                     struct membership *msptr, const char *, const char *);
-extern int can_join(struct Client *source_p, struct Channel *chptr, char *key);
+extern int can_join(struct Client *source_p, struct Channel *chptr,
+                   const char *key, const char **forward);
 
 extern struct membership *find_channel_membership(struct Channel *, struct Client *);
 extern const char *find_channel_status(struct membership *msptr, int combine);
@@ -240,9 +244,7 @@ extern void channel_member_names(struct Channel *chptr, struct Client *,
 
 extern void del_invite(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)
+const char *channel_modes(struct Channel *chptr, struct Client *who);
 
 extern struct Channel *find_bannickchange_channel(struct Client *client_p);
 
@@ -264,14 +266,15 @@ 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, int parc, const char *parv[]);
+               struct Channel *chptr, const char *newmlock, int propagate);
 
 extern struct ChannelMode chmode_table[256];
 
 extern int add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
-       rb_dlink_list * list, long mode_type);
+       const char *forward, rb_dlink_list * list, long mode_type);
 
-extern int del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list, long mode_type);
+extern struct Ban * del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list,
+       long mode_type);
 
 extern ExtbanFunc extban_table[256];
 
@@ -279,5 +282,8 @@ 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);
+
+extern void send_channel_join(struct Channel *chptr, struct Client *client_p);
 
 #endif /* INCLUDED_channel_h */