aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc_im.c8
-rw-r--r--protocols/jabber/jabber.c1
-rw-r--r--protocols/jabber/sasl.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/irc_im.c b/irc_im.c
index 6add08dd..986693aa 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -450,9 +450,13 @@ static gboolean bee_irc_user_privmsg( irc_user_t *iu, const char *msg )
static gboolean bee_irc_user_privmsg_cb( gpointer data, gint fd, b_input_condition cond )
{
irc_user_t *iu = data;
- char *msg = g_string_free( iu->pastebuf, FALSE );
+ char *msg;
GSList *l;
+ msg = g_string_free( iu->pastebuf, FALSE );
+ iu->pastebuf = NULL;
+ iu->pastebuf_timer = 0;
+
for( l = irc_plugins; l; l = l->next )
{
irc_plugin_t *p = l->data;
@@ -478,8 +482,6 @@ static gboolean bee_irc_user_privmsg_cb( gpointer data, gint fd, b_input_conditi
bee_user_msg( iu->irc->b, iu->bu, msg, 0 );
g_free( msg );
- iu->pastebuf = NULL;
- iu->pastebuf_timer = 0;
return FALSE;
}
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 0ae903e2..e7692484 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -318,6 +318,7 @@ static int jabber_buddy_msg( struct im_connection *ic, char *who, char *message,
{
imcb_error( ic, "OAuth failure" );
imc_logout( ic, TRUE );
+ return 0;
}
}
diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c
index f232864b..f21a6706 100644
--- a/protocols/jabber/sasl.c
+++ b/protocols/jabber/sasl.c
@@ -447,7 +447,8 @@ void sasl_oauth2_init( struct im_connection *ic )
static gboolean sasl_oauth2_remove_contact( gpointer data, gint fd, b_input_condition cond )
{
struct im_connection *ic = data;
- imcb_remove_buddy( ic, "jabber_oauth", NULL );
+ if( g_slist_find( jabber_connections, ic ) )
+ imcb_remove_buddy( ic, "jabber_oauth", NULL );
return FALSE;
}