That wouldn't make him leave if he just joined and said nothing.
on me:*:JOIN:[color:red]#: $+(.timer,idle,#) 1 420 part #
on me:*:PART:#: $+(.timer,idle,#) off
on *:INPUT:#: if /* !iswm $$1 { $+(.timer,idle,#) 1 420 part # }
[/color]
Greets
Edit: @Noplex: replace the # to the channel of your liking. Note you only have to change it in the red parts.