+/**
+ * @file
+ * Channel management (header)
+ */
+
+#if defined(__channel_c__) | defined(S_SPLINT_S)
+
+#include "lists.h"
+#include "defines.h"
+#include "array.h"
+
+typedef struct _CHANNEL
+{
+ struct _CHANNEL *next;
+ char name[CHANNEL_NAME_LEN]; /* Name of the channel */
+ UINT32 hash; /* Hash of the (lowecase!) name */
+ char modes[CHANNEL_MODE_LEN]; /* Channel modes */
+ array topic; /* Topic of the channel */
+#ifndef STRICT_RFC
+ time_t creation_time; /* Channel creation time */
+ time_t topic_time; /* Time when topic was set */
+ char topic_who[CLIENT_NICK_LEN];/* Nickname of user that set topic */
+#endif
+ char key[CLIENT_PASS_LEN]; /* Channel key ("password", mode "k" ) */
+ unsigned long maxusers; /* Maximum number of members (mode "l") */
+ struct list_head list_bans; /* list head of banned users */
+ struct list_head list_excepts; /* list head of (ban) exception list */
+ struct list_head list_invites; /* list head of invited users */
+ array keyfile; /* Name of the channel key file */
+} CHANNEL;
+
+typedef struct _CLIENT2CHAN
+{
+ struct _CLIENT2CHAN *next;
+ CLIENT *client;
+ CHANNEL *channel;
+ char modes[CHANNEL_MODE_LEN]; /* User-Modes in Channel */
+} CL2CHAN;
+
+#else
+
+typedef POINTER CHANNEL;
+typedef POINTER CL2CHAN;
+
+#endif
+
+GLOBAL struct list_head *Channel_GetListBans PARAMS((CHANNEL *c));
+GLOBAL struct list_head *Channel_GetListExcepts PARAMS((CHANNEL *c));
+GLOBAL struct list_head *Channel_GetListInvites PARAMS((CHANNEL *c));
+
+GLOBAL void Channel_Init PARAMS(( void ));
+GLOBAL void Channel_InitPredefined PARAMS(( void ));
+GLOBAL void Channel_Exit PARAMS(( void ));
+
+GLOBAL bool Channel_Join PARAMS(( CLIENT *Client, const char *Name ));
+GLOBAL bool Channel_Part PARAMS(( CLIENT *Client, CLIENT *Origin, const char *Name, const char *Reason ));
+
+GLOBAL void Channel_Quit PARAMS(( CLIENT *Client, const char *Reason ));
+
+GLOBAL void Channel_Kick PARAMS((CLIENT *Peer, CLIENT *Target, CLIENT *Origin,
+ const char *Name, const char *Reason));
+
+GLOBAL unsigned long Channel_CountVisible PARAMS((CLIENT *Client));
+GLOBAL unsigned long Channel_MemberCount PARAMS(( CHANNEL *Chan ));
+GLOBAL int Channel_CountForUser PARAMS(( CLIENT *Client ));
+
+GLOBAL const char *Channel_Name PARAMS(( const CHANNEL *Chan ));
+GLOBAL char *Channel_Modes PARAMS(( CHANNEL *Chan ));
+GLOBAL char *Channel_Topic PARAMS(( CHANNEL *Chan ));
+GLOBAL char *Channel_Key PARAMS(( CHANNEL *Chan ));
+GLOBAL unsigned long Channel_MaxUsers PARAMS(( CHANNEL *Chan ));
+
+GLOBAL void Channel_SetTopic PARAMS(( CHANNEL *Chan, CLIENT *Client, const char *Topic ));
+GLOBAL void Channel_SetModes PARAMS(( CHANNEL *Chan, const char *Modes ));
+GLOBAL void Channel_SetKey PARAMS(( CHANNEL *Chan, const char *Key ));
+GLOBAL void Channel_SetMaxUsers PARAMS(( CHANNEL *Chan, unsigned long Count ));
+
+GLOBAL CHANNEL *Channel_Search PARAMS(( const char *Name ));
+
+GLOBAL CHANNEL *Channel_First PARAMS(( void ));
+GLOBAL CHANNEL *Channel_Next PARAMS(( CHANNEL *Chan ));