Skip to content

Instantly share code, notes, and snippets.

@jyukutyo
Created February 20, 2015 05:54
Show Gist options
  • Save jyukutyo/0fdca6dfd02d4fbef3b7 to your computer and use it in GitHub Desktop.
Save jyukutyo/0fdca6dfd02d4fbef3b7 to your computer and use it in GitHub Desktop.
messages irc channel by recieving http request
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