Right click in your nicklist and choose Away System. Set your away message, and your original/away nicknames. Choose from the Idle Away, Advertise, and Return on Text options, and click Leave. Fairly simple. Tested and found no errors. Hope you all enjoy it.
Also thanks to xDaeMoN and RusselB for pointing me in the right direction.
menu nicklist {
Away System:awaysystem
}
alias awaysystem {
dialog -mdo awaysystem awaysystem
}
dialog awaysystem {
title "Away System"
size -1 -1 150 150
option dbu
button "Set Away Message", 1, 4 17 71 10
button "Clear Away Message", 2, 75 17 71 10
button "Set Original Nickname", 3, 4 47 70 10
button "Set Away Nickname", 4, 76 47 70 10
button "Leave", 5, 96 112 50 35
button "Return", 6, 96 112 50 35
radio "20 Minutes", 7, 25 75 34 10, group
radio "30 Minutes", 8, 25 85 34 10
radio "60 Minutes", 9, 25 95 34 10
radio "20 Minutes", 10, 97 75 34 10, group
radio "30 Minutes", 11, 97 85 34 10
radio "60 Minutes", 12, 97 95 34 10
check "Idle Away", 13, 10 65 32 10
check "Advertise", 14, 82 65 31 10
check "Return on Text", 15, 10 122 45 10
edit "", 16, 4 6 142 10, autohs
edit "", 17, 4 36 70 10, autohs
edit "", 18, 76 36 70 10, autohs
}
on *:dialog:awaysystem:*:*: {
if ( $devent == init ) {
did -hb $dname 6
did -a awaysystem 16 %away.reason
did -a awaysystem 17 %original.nick
did -a awaysystem 18 %away.nick
did -c $dname %idle.away.ID
did -c $dname %advertise.ID
if %idle.away == on { did -c awaysystem 13 }
if %advertise == on { did -c awaysystem 14 }
if %text.return == on { did -c awaysystem 15 }
}
elseif ( $devent == sclick ) {
if ( $did == 1 ) {
set %away.reason $didtok(16).text
}
elseif ( $did == 2 ) {
unset %away.reason
did -r awaysystem 16
}
elseif ( $did == 3 ) {
set %original.nick $didtok(17).text
}
elseif ( $did == 4 ) {
set %away.nick $didtok(18).text
}
elseif ( $did == 5 ) {
gone
did -ve $dname 6
did -hb $dname 5
}
elseif ( $did == 6 ) {
back
did -ve $dname 5
did -hb $dname 6
}
elseif ( $did == 7 ) {
set %idle.away.ID 7
set %idle.time 1200
}
elseif ( $did == 8 ) {
set %idle.away.ID 8
set %idle.time 1800
}
elseif ( $did == 9 ) {
set %idle.away.ID 9
set %idle.time 3600
}
elseif ( $did == 10 ) {
set %advertise.ID 10
set %advertise.time 1200
}
elseif ( $did == 11 ) {
set %advertise.ID 11
set %advertise.time 1800
}
elseif ( $did == 12 ) {
set %advertise.ID 12
set %advertise.time 3600
}
elseif ( $did == 13 ) {
if $did(awaysystem,13).state == 1 {
set %idle.away on
.timeridle 0 %idle.time idling
}
elseif $did(awaysystem,13).state == 0 {
set %idle.away off
unset %idle.time
did -u $dname 7-9
}
}
elseif ( $did == 14 ) {
if $did(awaysystem,14).state == 1 {
set %advertise on
}
elseif $did(awaysystem,14).state == 0 {
set %advertise off
unset %advertise.time
did -u $dname 10-12
}
}
elseif ( $did == 15 ) {
if $did(awaysystem,15).state == 1 {
set %text.return on
}
elseif $did(awaysystem,15).state == 0 {
set %text.return off
}
}
}
}
alias gone {
set %gone yes
set %time.left $time(hh:nntt)
amsg 14,1[0,1 I am now 3,1Away 14,1][0,1 Reason:3,1 %away.reason 14,1]
away %away.reason
.timer 1 2 nick %away.nick
if (%advertise == on) { .timeradvertise 0 %advertise.time amsg 14,1[0,1 I am still 3,1Away 14,1][0,1 Reason:3,1 %away.reason 14,1] }
if (%idle.away == on) { .timeridle off }
}
alias back {
unset %gone
amsg 14,1[0,1 I am now 3,1Back 0,1from:3,1 %away.reason 14,1][0,1 I left at:3,1 %time.left 14,1]
away
.timer 1 2 nick %original.nick
if (%advertise == on) { .timeradvertise off }
if (%idle.away == on) { .timeridle 0 %idle.time idling }
}
alias idling {
set %gone yes
set %away.reason Auto away on Idle
set %time.left $time(hh:nntt)
amsg 14,1[0,1 I am now 3,1Away 14,1][0,1 Reason:3,1 Auto away on Idle 14,1]
away Auto away on Idle
.timer 1 2 nick %away.nick
if (%advertise == on) { .timeradvertise 0 %advertise.time amsg 14,1[0,1 I am still 3,1Away 14,1][0,1 Reason:3,1 Auto away on Idle 14,1] }
if (%idle.away == on) { .timeridle off }
}
on *:INPUT:#: {
if (%idle.away == on) { .timeridle 0 %idle.time idling }
if (%text.return == on) && (%gone == yes) { back }
}
13 and 14 are already shown using if %idle.away == on { did -c awaysystem 13 } and if %advertise == on { did -c awaysystem 14 }
Those show if the cheboxes for Idle Away and Advertise are checked or not.
The did -c $dname %idle.away.ID and did -c $dname %advertise.ID are there to show which corresponding radio is selected.
Scakk you are getting those errors because you must select one of the three minute options beneath Idle Away, and the Advertise checkboxes. That is the whole reason they are there. As to Lindrian, I have no idea what you are getting at with those suggestions. I haven\'t used $iif yet, or anything like $v1. I tend to avoid using variables, because I have not learned how to accurately use them.