Code:
alias join {
  if -* iswm $1 {
    var %switches = $1
    tokenize 32 $2-
  }
  join %switches $regsubex($1-, /([^\x2c]+)/g, $iif($left(\1, 1) isin $chantypes, \1, $chr(35) $+ \1))
}


Good job I was here to overcome this difficult obstacle!


Spelling mistakes, grammatical errors, and stupid comments are intentional.