 
 TUPLE: ui-window < tabbed client ;
 
+M: ui-window ungraft*
+    client>> terminate-irc ;
+
 TUPLE: irc-tab < frame listener client window ;
 
 : write-color ( str color -- )


: add-gadget-color ( pack seq color -- pack )
    '[ , >>color add-gadget ] each ;

: update-participants ( tab -- )
    [ userlist>> [ clear-gadget ] keep ]

M: participant-changed handle-inbox
    drop update-participants ;

TUPLE: irc-server-tab < irc-tab ;

: <irc-server-tab> ( listener -- irc-tab )
    f irc-server-tab new-irc-tab ;

: <irc-nick-tab> ( listener ui-window -- irc-tab )
    irc-tab new-irc-tab ;
