int id;
char *name;
char *desc;
+ char *password;
struct channel *parent;
bool_t temporary, noenter;
struct dlist node;
struct dlist node;
} channellist_t;
+typedef enum {
+ CHJOIN_OK,
+ CHJOIN_NOENTER,
+ CHJOIN_WRONGPW,
+ CHJOIN_NOTFOUND,
+} channelJoinResult_t;
+
void Chan_init();
void Chan_free();
void Chan_addChannel(channel_t *parent, channel_t *sub);
int Chan_userJoin(channel_t *ch, client_t *client);
int Chan_userJoin_id(int channelid, client_t *client);
int Chan_userLeave(client_t *client);
-bool_t Chan_userJoin_id_test(int channelid);
+channelJoinResult_t Chan_userJoin_id_test(int channelid, client_t *client);
channel_t *Chan_iterate(channel_t **channelpptr);
channel_t *Chan_iterate_siblings(channel_t *parent, channel_t **channelpptr);
channel_t *Chan_createChannel(const char *name, const char *desc);