Better use
!ping to bypass the default ping alias. Also, that didn't reset my idle time on UnderNet.
on *:START: {
.timerAnti-Idle -oi 0 30 scon -at1 !.ctcp $!me Anti-Idle
}
ctcp *:Anti-Idle:?: {
if (($nick == $me) && ($1 == Anti-Idle)) haltdef
}
EnglishExpress change that 30 seconds to whatever you want although I would go much less than that if any.
~ Edit ~
Fixed typo and prefixed ctcp command with a .