aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc.c2
-rw-r--r--irc.h2
-rw-r--r--irc_im.c5
3 files changed, 6 insertions, 3 deletions
diff --git a/irc.c b/irc.c
index 4a7ba332..39943877 100644
--- a/irc.c
+++ b/irc.c
@@ -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 );
diff --git a/irc.h b/irc.h
index e28182ce..79e23f09 100644
--- a/irc.h
+++ b/irc.h
@@ -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
diff --git a/irc_im.c b/irc_im.c
index b7c90f2c..51114bfd 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -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 = {