Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = (robot) ->
- list = [
- ['username1', 'password1'],
- ['username2', 'password2']
- ]
- robot.hear /(["'w: -_]+)/i, (res) ->
- username = res.match[0]
- find = list.indexOf(username)
- pass = list[find][1]
- if robot.auth.hasRole(res.envelope.user,'admin')
- res.reply "Here is the password '#{pass}'"
- else res.reply "Sorry, I can't tell you that."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement