You have the '/timer off' command outside the braces, so it is being turned off even if $idle < 2700
Code:
On *:Connect: {
.timer(autoaway) 0 10 awaychk
}
alias awaychk {
If ($idle > 2700) {
nick %away.nick
ns identify %away.system.nick.pass
amsg 14A15uto-14A15way after 45 mintues
.timer(autoaway) off
}
}