aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c8
1 files changed, 5 insertions, 3 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;
}