Dialog asks you to input whether you want to have an away message and it asks you if your away is extended (long term) or not (short term). This does not apply unless you are using the away message. Anyway, it also replies to querys. Have fun using it.
***********************Cobra Script Away System*****************
[[ irc.scrollrack.com]]
( #cobra'slair )
dialog away {
title "**samcobra's away system**"
size -1 -1 100 65
option dbu
text "Welcome to samcobra's away system.", 1, 2 1 135 22
button "cancel", 2, 10 10 70 10, cancel
button "away",3, 10 20 70 10,
button "back", 4, 10 30 70 10
check "Have an AMSG?", 5, 10 40 70 10
check "extended away?", 6, 10 50 70 10
}
on *:dialog:away:sclick:3:{
if (%status != away) {
set %status away
set %reason $?="Reason:"
away %reason
set %me $me
amsg 4 %me $+ 's Status Is Now Set To Away ! 4,15Reason: %reason
nick $me $+ |away
if ($did(away,5).state == 1) {
if ($did(away,6).state == 1) {
timeraway 0 $rand(1100,1600) extawymsg
}
elseif ($did(away,6).state == 0) {
timeraway 0 $rand(300,500) awymsg
}
}
dialog -x away away
}
}
on *:dialog:away:sclick:4:{
if (%status == away) {
away
unset %reason
unset %status
nick %me
amsg 7 %me $+ 's Status Is Now Set To Active
unset %me
timeraway off
dialog -x away away
}
}
menu channel,status,query,menubar {
samcobra's away system: /dialog -m away away
}
on *:open:?:*: {
if (%status == away) && ($nick != $me) {
msg $nick 4 Sorry, I am Away Right Now. 4,15Reason: %reason
msg $nick 4 I have been away for $duration($awaytime) !
}
}
alias extawymsg {
amsg 4 I have been away for $duration($awaytime). 4,15Reason: %reason . Time period: Extended
}
alias awymsg {
amsg 4 I have been away for $duration($awaytime) . 4,15Reason: %reason
}
on *:disconnect: {
if (%status == away) {
timeraway off
unset %status
unset %reason
nick %me
unset %me
}
}