If no limit is set $chan(#).limit is not 'less than', 'equal to', or 'greater than' anything. :tongue:
Code:
on @*:join:#channel:{
  if $chan(#).limit != 5 { mode # +l 5 }
}