Created
January 8, 2012 22:49
-
-
Save booo/1579989 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
| #!/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