Last active
August 29, 2015 14:24
-
-
Save dhrrgn/bfd9c890161bf10c25f3 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
# Usage: @HAL tombstone First Line / Second Line / Third Line / Fourth Line | |
module.exports = (robot) -> | |
robot.respond /tombstone (.*)/i, (res) -> | |
lines = res.match[1].split '/' | |
if lines.length > 4: | |
res.reply "Too many lines. Max 4." | |
else | |
query = for i, line of lines | |
"top#{parseInt(i)+1}=#{encodeURIComponent(line)}" | |
res.reply "http://www.tombstonebuilder.com/generate.php?#{query.join('&')}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment