~mapperr/iir

a5d1a2b73fc3626c550831c72d4953a35d967f37 — mapperr 1 year, 6 months ago ae0b700
Channel sync job persist detaches
1 files changed, 11 insertions(+), 6 deletions(-)

M iir
M iir => iir +11 -6
@@ 61,7 61,7 @@ is_channel_in_the_ui() {
    local ui_screen_session_name="$1"
    local channel_dir="$2"
    screen -S $ui_screen_session_name -Q windows '%t' | \
        grep $channel_dir >/dev/null
        grep "$channel_dir" >/dev/null
}

launch_chat_ui() {


@@ 122,13 122,13 @@ vbell off
bell_msg ""
msgwait 0
escape ^Bb
bind l windowlist -b
bind ^l windowlist -b
bind h windowlist -b
bind ^h windowlist -b
bind q quit
EOF
    {
        sleep 2
        while test ! -r $uistop_file; do
        while test ! -f "$uistop_file"; do
            for channel_dir in `get_active_channel_list`; do
                is_channel_in_the_ui "$UI_SCREEN_SESSION_NAME" "$channel_dir" >/dev/null && continue
                screen -S irc -X screen -t $channel_dir $0 c $channel_dir


@@ 136,10 136,15 @@ EOF
            done 
            sleep 2
        done
        rm -f $uistop_file
        rm -f "$uistop_file"
    } &
    screen -c $screenrc_file -T xterm-256color -S irc -U -O -t net $0 c
    touch $uistop_file
    {
        while screen -ls "$UI_SCREEN_SESSION_NAME" >/dev/null; do
            sleep 1
        done
        touch "$uistop_file"
    } &
elif test "$command" = "r"; then
    screen -d -r irc
else