Code:
menu nicklist {
  Greet : greet $chan
}
alias -l greet {
  var %a = 1, %b = $nick($1,0), %greet
  while %a <= %b {
    %greet = $addtok(%greet,$nick($1,%a),44)
    inc %a
  }
  %greet = $remtok(%greet,$me,1,44)
  %greet = $replace(%greet,$chr(44),$+($chr(44),$chr(32)))
  .msg $1 Hello %greet
}

For the bots, just add a line like
Code:
%greet = $remtok(%greet,$me,1,44)
replacing $me with the nick of the bot