Created
September 6, 2013 21:40
-
-
Save wixo/6470341 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Lisp Drinking Game | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# None | |
# | |
# Author: | |
# wxo | |
# Max number of lisp mentions | |
MAX_LISP_MENTIONS = 1 | |
module.exports = (robot) -> | |
robot.hear /lisp/i, (msg) -> | |
name = msg.message.user.name | |
user = robot.brain.userForName name | |
if typeof user is 'object' | |
user.puercopop_mentions ||= 0 | |
user.puercopop_mentions += 1 | |
if user.puercopop_mentions >= MAX_LISP_MENTIONS | |
user.puercopop_mentions = 0 | |
msg.send "*drink*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ivoscc You are Drunk!