Two more methods using hash tables:

Code:
on $*:text:/^!(add\b|groups?\b) ?(alpha\b|beta\b)?/giS:#:{
  var %g $regml(2)
  if !$3 && $regml(1) = add && %g {
    hadd -m %g $nick
    notice $nick You are in the %g group
    %g = $iif(%g = alpha,beta,alpha)
    $iif($hget(%g),hdel %g $nick)
  }
  elseif ($regml(1) = add) msg # Invalid Parameters. Use: !add alpha or !add beta
  elseif (!$2) msg # [Group] Alpha $hget(alpha,0).item users [Group] Beta $hget(beta,0).item users
}


Smaller and more precise:

Code:
on $*:text:/^!add (alpha|beta)$/iS:#:{
  var %g $regml(1)
  hadd -m %g $site
  notice $nick You are in the %g group
  %g = $iif(%g = alpha,beta,alpha)
  $iif($hget(%g),hdel %g $site)
}
on $*:text:/^!add\b/iS:#:msg # Invalid Parameters. Use: !add alpha or !add beta
on $*:text:/^!groups?$/iS:#:msg # [Group] Alpha $hget(alpha,0).item users [Group] Beta $hget(beta,0).item users