on *:TEXT:*:?:{ $+(.timer.close.query.,$cid,.,$nick) -o 1 300 close -m $nick }
on *:INPUT:?:{ $+(.timer.close.query.,$cid,.,$target) -o 1 300 close -m $target }

That well (re)activate the timer at 5mins when they say something, or if u say something. So it closes 5 mins after you too have stop talking.