diff options
-rw-r--r-- | irc.c | 2 | ||||
-rw-r--r-- | irc.h | 2 | ||||
-rw-r--r-- | irc_im.c | 5 |
3 files changed, 6 insertions, 3 deletions
@@ -635,7 +635,7 @@ int irc_check_login( irc_t *irc ) irc->umode[0] = '\0'; irc_umode_set( irc, "+" UMODE, TRUE ); - ic = irc_channel_new( irc, ROOT_CHAN ); + ic = irc->default_channel = irc_channel_new( irc, ROOT_CHAN ); irc_channel_set_topic( ic, CONTROL_TOPIC, irc->root ); irc_channel_add_user( ic, irc->user ); @@ -77,6 +77,7 @@ typedef struct irc GSList *file_transfers; GSList *users, *channels; + struct irc_channel *default_channel; GHashTable *nick_user_hash; GHashTable *watches; @@ -129,6 +130,7 @@ extern const struct irc_user_funcs irc_user_self_funcs; typedef enum { IRC_CHANNEL_JOINED = 1, + IRC_CHANNEL_CONTACTS = 256, } irc_channel_flags_t; typedef struct irc_channel @@ -80,7 +80,7 @@ static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old { irc_t *irc = bee->ui_data; irc_user_t *iu = bu->ui_data; - irc_channel_t *ic = irc->channels->data; /* For now, just pick the first channel. */ + irc_channel_t *ic = irc->default_channel; /* Do this outside the if below since away state can change without the online state changing. */ @@ -118,7 +118,7 @@ static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old static gboolean bee_irc_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at ) { irc_t *irc = bee->ui_data; - irc_channel_t *ic = irc->channels->data; + irc_channel_t *ic = irc->default_channel; irc_user_t *iu = (irc_user_t *) bu->ui_data; char *dst, *prefix = NULL; char *wrapped, *ts = NULL; @@ -409,6 +409,7 @@ static gboolean bee_irc_channel_chat_part( irc_channel_t *ic, const char *msg ) static gboolean bee_irc_channel_chat_topic( irc_channel_t *ic, const char *new ) { + return TRUE; } static const struct irc_channel_funcs irc_channel_im_chat_funcs = { |