diff options
-rw-r--r-- | irc_channel.c | 2 | ||||
-rw-r--r-- | irc_im.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c index 15b1744a..03fe93e9 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -142,6 +142,8 @@ int irc_channel_free( irc_channel_t *ic ) iu->last_channel = irc->default_channel; } + if( ic->pastebuf_timer ) b_event_remove( ic->pastebuf_timer ); + g_free( ic->name ); g_free( ic->topic ); g_free( ic->topic_who ); @@ -793,7 +793,8 @@ static gboolean bee_irc_channel_chat_privmsg_cb( gpointer data, gint fd, b_input { irc_channel_t *ic = data; - bee_chat_msg( ic->irc->b, ic->data, ic->pastebuf->str, 0 ); + if( ic->data ) + bee_chat_msg( ic->irc->b, ic->data, ic->pastebuf->str, 0 ); g_string_free( ic->pastebuf, TRUE ); ic->pastebuf = 0; @@ -840,6 +841,8 @@ static gboolean bee_irc_channel_chat_part( irc_channel_t *ic, const char *msg ) if( c && c->ic->acc->prpl->chat_leave ) c->ic->acc->prpl->chat_leave( c ); + ic->data = NULL; + return TRUE; } |