ok, I played with this a bit, still using you
alias away.off {
if (%away != off) {
set %away off
echo 5 -a Away is off.
amsg $me is back.
disable #autoback
}
elseif (%away == off) {
echo 5 -a away is already off.
echo 4 -a $+(%,away) %away
}
}
alias away.on {
if (%away != on) {
set %away on
echo 5 -a Away is on.
amsg $me is away.
enable #autoback
}
elseif (%away == on) {
echo 5 -a away is already on.
echo 4 -a $+(%,away) %away
}
}
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).status == off) {
enable #autoback
echo 5 -a auto back is on
}
elseif ($group(#autoback).status == on) {
echo 5 -a auto back is already on
}
}
..off {
if ($group(#autoback).status == on) {
disable #autoback
echo 5 -a auto back is off
}
elseif ($group(#autoback).status == 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 off
on *:input:#:{
if (%away == on) {
away.off
}
}
#autoback end
several things
As pointed out using == not = when checking the value of a variable (or any other comparison) will avoid false matches and other problems.
your %away was never set in the3 script, so it always failed
Note how i changed the test to if it is not eaual to on, set it on instead of "if it is equal to off set it on"
while the logic may seem the same, it really isnt because if %away == $null (no value) then it didn't equal off (what you tested against) so it failed to set it on.
also where you tested the status of the group, you didnt use the .status modifier, while it works in menus like that I have seen that it doesnt work elsewhere so adding the .status and it begins to have a valid comparison.
I think thats it, look it over and continue testing. Also think about how you can make the code smaller, can you combine the coding in the menu with the coding in the aliases?
do you need the group for the autoback? (good way to test a value rather than a global variable?)
keep at it and I think you will be very happy with what you make.
and as always post questions here (we need the mental excercise)