Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. module.exports = (robot) ->
  2.  
  3. list = [
  4. ['username1', 'password1'],
  5. ['username2', 'password2']
  6. ]
  7. robot.hear /(["'w: -_]+)/i, (res) ->
  8. username = res.match[0]
  9. find = list.indexOf(username)
  10. pass = list[find][1]
  11. if robot.auth.hasRole(res.envelope.user,'admin')
  12. res.reply "Here is the password '#{pass}'"
  13. else res.reply "Sorry, I can't tell you that."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement