Skip to content

Instantly share code, notes, and snippets.

@booo
Created January 8, 2012 22:49
Show Gist options
  • Select an option

  • Save booo/1579989 to your computer and use it in GitHub Desktop.

Select an option

Save booo/1579989 to your computer and use it in GitHub Desktop.
#!/usr/bin/env coffee
{ createServer } = require "net"
irc = require "irc"
NICK = "munin-spline"
PIPE = "./pipe.sock"
channels = ["#spline"]
client = new irc.Client "irc.freenode.net", NICK, { channels: channels }
server = createServer (c) ->
c.on "data", (data) ->
for channel in channels
client.say channel, data
server.listen PIPE
client.on "error", (message) ->
console.log message
client.on "message", (from, to, message) ->
console.log from, to, message
client.on "kick", (channel, who, kicker, reason) ->
unless who is NICK then client.join channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment