This sets a var when user joins for 30secs (you can adjust the time here "inc -u30 ...")
When user parts if the var is still set, the user is banned for 1200 secs (ban -u1200 # ...")
Code:
on @*:join:#:{
  inc -u30 $+(%,flyby,$cid,#,.,$site)
}
on @!*:part:#:{
  if $($+(%,flyby,$cid,#,.,$site),2) { ban -u1200 # $wildsite }
}