You can use the ping effect to manipulate your idle time like this:

Code:
on *:CONNECT: {
  .timerping 0 30 ping $me
}

on ^*:PONG: haltdef


If you use this script, your highest idle time is 30 seconds.