on *:OP:[color:blue]#channelname[/color]: {
[color:green]; start checking when you get ops[/color]
if ($opnick == $me) .timerdeop 0 60 deopcheck $chan
}
[color:green] [/color]
alias deopcheck {
[color:green]; check if you're opped and idle[/color]
if ($me isop $1) && ($awaytime > 600) {
[color:green]; deop yourself[/color]
.mode $1 -o $me
[color:green]; we won't be needing that timer anymore[/color]
.timerdeop off
}
}
Change the parts in blue before using. You can also replace $awaytime with $idle to do 10 minutes idle. Just cause when you're set as away it doesn't have to mean you necessarily are
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
And how would that code check if he's away or not? It will deop him no matter what. Also -- why did you use %chan in the timer and not simply $chan? Saves you from having to set a variable, and also keeps your variables section nice and clean as you don't remove the variable when you're done with it either.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
i thought, he meant, after he gets op, he goes away..... i use %chan because sometimes $chan doesnt work in timers, dunno if im alone on that :tongue:.