so the base is from another snippet from here i don't remember :/
but i'll tell you if i find the original author
but i edited much of it..
the functions are:
if someone sees an error please tell me that :)
dialog away {
title "Away System"
size -1 -1 120 65
option dbu
box "Grund:", 1, 26 1 90 20
box "Away Nick:", 2, 26 21 90 20
box "Auto Away:", 8, 6 43 110 20
button "Away", 3, 6 3 17 10
button "Back", 4, 6 17 17 10
button "Exit", 5, 6 31 17 10, cancel
button "Set",10, 95 50 17 10
edit "", 6, 28 9 86 10, autohs
edit "", 7, 28 29 86 10, autohs
edit "", 9, 50 51 15 10, autohs
text "Autoaway after", 11, 10 52 40 10
text "min (0=off)", 12, 66 52 28 10
}
on *:dialog:away:sclick:3: {
if ( %away.rly = $null ) {
set %away.time $ctime
set %away.nick.2 $me
set %away.nick $did(6).text
set %nick.nick $did(7).text
set %away.rly true
amsg i'm away now, $did(6).text $+ ...
nick %nick.nick
away %away.nick
}
}
on *:dialog:away:init:0:{
did -a away 6 %away.nick
did -a away 7 %nick.nick
did -a away 9 %auto.time
}
on *:dialog:away:sclick:10:{
if ( $did(9).text = 0 ) {
timerautoaway off
}
else {
set %auto.time $did(9).text
set %goneaway $calc( $ctime + ( %auto.time * 60 ) )
timerautoaway 1 30 checkaway
}
}
alias checkaway {
if ( $ctime > %goneaway && %away.rly = $null ) {
set %away.time $ctime
set %away.nick.2 $me
set %away.nick auto away after %auto.time mins being idle
set %nick.nick $me $+ ^afk
set %away.rly true
amsg %away.nick $+ ...
nick %nick.nick
away %away.nick
}
else {
timerautoaway 1 30 checkaway
}
}
on *:input:*:{
set %goneaway $calc( $ctime + ( %auto.time * 60 ) )
}
on *:dialog:away:sclick:4: {
if ( %away.rly = true ) {
nick %away.nick.2
amsg i'm back (i was away %away.nick - $duration($calc($ctime - %away.time)) afk)
away
unset %away.rly
}
}
menu channel,query,status {
Away System:dialog -m away away
}
on *:TEXT:$(* $me *):#:{
if ( %away.rly = true ) {
notice $nick Hey $nick $+ ! i'm afk atm, please leave me a message in query if you need me
}
}
on *:text:*:?:{
if ( %away.msg [ $+ [ $nick ] ] = on ) {
window @awaylog
aline @awaylog $time(HH:nn) - < $+ $nick $+ > $1-
}
}
on *:open:?:{
if ( %away.rly = true ) {
msg $nick Hey $nick $+ ! i'm away atm, you can leave a message for me within 60 seconds
.timer 1 60 msg $nick thanks for that :)
window @awaylog
aline @awaylog $time(HH:nn) - < $+ $nick $+ > $1-
timer 1 63 close -m $nick
timer 1 62 msg $nick
set -u62 %away.msg [ $+ [ $nick ] ] on
}
}
look into useing $away $awaytime $awaymsg instead of setting unnecessary vars.
also you may want to have it do a one time response to anyone that says ur nick, or if not that some sort of flood pro. the way you have it now they can flood you off.
um if you are going to be useing timers, it would be a good idea for you to name them, and make sure you silence all timers.