How about this?
part %chan. [ $+ [ $nick ] ] Idle agreement broken by $nick $+ .
This way they know why the bot is leaving. If a nick parts, then they could just not end the idle agreement, and not idle your channel, while the bot still idles them. An obvious glitch already in this script is the fact that if the user changes their nick, they can leave without the bot catching it. Since I don\'t run this on a dedicated server, usually every couple days it reconnects and I lose all the channels anyway. It doesn\'t matter if I idle a couple extra channels, because I can\'t join too many :D