menu * { Away:/dialog -m away2 away2 } alias brb { if ($2- == $null) { /ame is now away: No reason specified. Left at: $asctime(HH:nn:ss) set %awaystatus on set %backnick $me set %awayreason No Reason specified set %awayfrom $ctime /away No Reason Specified /nick $1 write awaylog.txt --- Awaylog opened on $date at $asctime(HH:nn:ss) for reason: No reason specified --- } else { set %awaystatus on set %awayreason $2- set %backnick $me set %awayfrom $ctime /away $2- /nick $1 /ame is now away: $2- $+ . Left at: $asctime(HH:nn:ss) write awaylog.txt --- Awaylog opened on $date at $asctime(HH:nn:ss) for reason: $2- --- } } } alias back { if (%awayreason == $null) { write awaylog.txt --- Awaylog ended on $date at $asctime(HH:nn:ss) for reason: No reason specified --- unset %awaystatus /ame is back from: No reason specified. I was gone for: $duration($calc($ctime - %awayfrom)) $+ . /nick %backnick /away /dialog -mo logviewer logviewer } else { write awaylog.txt --- Awaylog ended on $date at $asctime(HH:nn:ss) for reason: %awayreason --- /ame is back from: %awayreason $+ . I was gone for: $duration($calc($ctime - %awayfrom)) $+ . /nick %backnick /away unset %awayreason unset %awaystatus /dialog -mo logviewer logviewer } } } on *:dialog:away2:sclick:7:{ set %backnick $me set %awayreason $did(4) /away $did(4) /ame is now away: $did(4) /nick $did(6) } on *:dialog:away2:sclick:15:{ /ame is now back from: %awayreason /nick %backnick /away } on *:dialog:away2:sclick:8:{ did -a away2 9 $did(17) $did(11) $did(13) write awaysys.txt $did(17) $did(11) $did(13) } on *:dialog:away2:sclick:18:{ did -r away2 9 did -r away2 11,13,17 } on *:dialog:away2:init:0:{ var %x = 1 while ($read(awaysys.txt,%x)) { /did -a away2 9 $v1 inc %x } } on *:text:*:#:{ if ($me isin $1-) { if (%awaystatus == on) write awaylog.txt $asctime(HH:nn:ss) ~ $nick ~ $chan >> $2- } } dialog away2 { title "Clb's away system" size -1 -1 150 100 option dbu tab "Quick away", 1, 0 0 149 99 text "Away Reason", 3, 18 18 50 10, tab 1 edit "", 4, 18 30 115 10, tab 1 text "Away Nick", 5, 19 44 50 10, tab 1 edit "", 6, 19 56 115 10, tab 1 button "Set away", 7, 18 71 120 10, tab 1 button "Set back", 15, 18 85 120 10, tab 1 tab "Presets", 2 list 9, 5 20 75 50, tab 2 size text "Away Nick", 10, 85 40 55 10, tab 2 edit "", 11, 85 50 55 10, tab 2 text "Away Reason", 12, 85 60 55 10, tab 2 edit "", 13, 85 70 55 10, tab 2 button "Set away", 14, 85 86 60 10, tab 2 button "Add preset", 8, 5 73 75 10, tab 2 text "Preset name", 16, 85 20 55 10, tab 2 edit "", 17, 85 30 55 10, tab 2 button "Delete preset", 18, 5 86 75 10, tab 2 }