while I didn't test this, I made some changes toyour
alias away.off {
if (%away = on) {
/set %away off
echo 5 -a Away is off.
set %chan 1
set %cnum $chan(0)
amsg $me is back.
disable #autoback
}
else {
echo 5 -a away is already off.
}
}
alias away.on {
if (%away = off) {
set %away on
echo 5 -a Away is on.
set %chan 1
set %cnum $chan(0)
amsg $me is away.
enable #autoback
}
else {
echo 5 -a away is already on.
}
}
on *:Connect: {
.timeraway 0 10 away.idle
}
alias away.idle {
if (($idle >= 600) && (%away != on)) {
away.on
}
}
menu channel {
auto away
.auto back
..on {
if ($group(#autoback) == off) {
enable #autoback
echo 5 -a auto back is on
elseif ($group(#autoback) == on) {
echo 5 -a auto back is already on
}
}
}
..off {
if ($group(#autoback) == on) {
disable #autoback
echo 5 -a auto back is off
elseif ($group(#autoback) == off) {
echo 5 -a auto back is already off
}
}
}
.on {
away.on
}
.off {
away.off
}
}
#away on
on *:text:*:?:{
if (%away == on) {
msg $nick I'm currently away from the keyboard
closemsg $nick
}
}
#away end
#autoback on
on *:input:#:{
if (%away = on) {
away.off
}
}
#autoback end
I moved the #away group heading so it would conflict with the menu and controls if that group were off (what did you want it to do?)
also included the enable/disable to the aliases you have
removed the while loops to msg the channels and replaced with amsg which is a mIRC built in "message all channels"
see /help /amsg
Keep after it, eventually you will hve the script you want.