 # Description:
-#   Define user aliases to @ mention groups of people at once.
+#   Define user aliases to @mention groups of people at once.
 #
 # Dependencies:
-#   underscorejs
+#   hubot-auth - for dynamically configured grouos
 #
 # Configuration:
 #   HUBOT_GROUP_ALIAS: group1=user1,user2;group2=user1,user2,user3 [...]
 #   HUBOT_GROUP_ALIAS_NAME_PROP: A property on the user object for @metions
 #
 # Commands:
-#   None
+#   hubot list group aliases - give the names of the defined groups.
 #
 # Notes:
 #   Use @group_name in your message and your robot will pass it along to

  groupCache = _.object(staticGroups)
  return groupCache

getGroups = (text) ->
  if useDynamicGroups
    groupMap = {}

    return groupMap
  else
    return buildGroupObject()

getGroupsList = ->
  if useDynamicGroups
    groups = []
    users = robot.brain.data.users
    for own id, user of users
      roles = robot.auth.userRoles(user)
      groups = groups.concat(roles)
    return _.uniq(groups)
  else
    return Object.keys(buildGroupObject())

userFromName = (name) ->
  allUsers = robot.brain.data.users
