rendered paste bodymenu channel {
Away (Status):status
}
alias status {
dialog -m status status
}
dialog status {
title "Away Dialog"
size -1 -1 235 140
option dbu
box "Away Table" 1, 5 1 110 45
text "Away Msg:" 2, 11 11 30 10
edit "", 3, 40 9 70 9
text "Set Nick:" 4, 11 24 30 10
edit "", 5, 36 22 74 9
button "Set Away" 6, 45 33 33 11
box "Back Table" 7, 120 1 110 45
text "Away Time:" 8, 128 11 30 8
text "", 9, 157 11 67 8
text "Nick:" 10, 128 23 30 8
edit "", 11, 141 22 83 8
button "Set Back" 12, 160 33 33 11
box "Quit Table" 13, 55 70 130 63
text "Quit/Part Msg:" 14, 60 80 35 10
edit "", 15, 96 78 85 10
text "Channel:", 16, 60 95 25 10
edit "", 17, 83 93 98 10
button "Part" 18, 80 106 37 11
button "Part All" 19, 117 106 37 11
button "Quit IRC" 20, 97 117 40 13
box "Status" 21, 55 48 130 20
text "Status:" 22, 60 56 30 10
text "", 23, 80 56 100 9
}
on *:DIALOG:status:init:0: {
did -a $dname 11 %cnick
did -a $dname 9 $iif(%atime != $acstime,$duration($calc($ctime - $ctime(%atime))),You aren't away.)
if (%away != on) {
did -a $dname 23 Active
}
if (%away == on) {
did -a $dname 23 Away
}
}
on *:DIALOG:status:sclick:6: {
if (%away != on) {
set %away on
set %cnick $me
set %awaymsg $did(3)
set %atime $asctime
set %nick $did(5)
amsg 4 .:[Away]:. 14 %awaymsg 4.:[Time]:. 14 $time
nick %nick
dialog -x status
}
else {
did -a $dname 23 You are already away.
}
}
on *:DIALOG:status:sclick:12: {
if (%away == on) {
amsg 4 .:[Back]:.14 %awaymsg 4 .:[Gone]:. 14 $duration($calc($ctime - $ctime(%atime)))
nick $did(11)
away
unset %cnick
unset %atime
unset %awaymsg
unset %nick
unset %away
dialog -x status
}
else {
did -a $dname 23 You aren't away.
}
}
on *:DIALOG:status:sclick:18: {
part $did(17) $did(15)
dialog -x status
}
on *:DIALOG:status:sclick:19: {
partall $did(15)
dialog -x status
}
on *:DIALOG:status:sclick:20: {
quit $did(15)
dialog -x status
}