Created
February 20, 2015 05:54
-
-
Save jyukutyo/0fdca6dfd02d4fbef3b7 to your computer and use it in GitHub Desktop.
messages irc channel by recieving http request
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
querystring = require('querystring') | |
module.exports = (robot) -> | |
robot.router.get "/hubot/say", (req, res) -> | |
query = querystring.parse(req._parsedUrl.query) | |
envelope = room: "#" + query.c | |
robot.send envelope, query.m | |
res.end "Said #{query.m} to channel #{query.c}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment