aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/irc.c b/irc.c
index a0ba6e53..15ad37f8 100644
--- a/irc.c
+++ b/irc.c
@@ -150,6 +150,20 @@ irc_t *irc_new( int fd )
return( irc );
}
+void irc_abort( irc_t *irc )
+{
+ irc->status = USTATUS_SHUTDOWN;
+ if( irc->sendbuffer )
+ {
+ g_source_remove( irc->r_watch_source_id );
+ irc->r_watch_source_id = g_timeout_add_full( G_PRIORITY_HIGH, 1000, (GSourceFunc) irc_free, irc, NULL );
+ }
+ else
+ {
+ irc_free( irc );
+ }
+}
+
static gboolean irc_free_userhash( gpointer key, gpointer value, gpointer data )
{
g_free( key );