summaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index 793581f..a9571f8 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -38,3 +38,13 @@ router.post("/_irc/post", function(req, res){
})
res.sendStatus(200)
})
+
+panda.watch(panda.channels[0], /(https?:\/\/[^\s]+)/g, function(data){
+ console.log(data)
+ data.match.forEach(function(match){
+ server.io.emit("link", {
+ nick: data.nick,
+ url: match,
+ })
+ })
+}) \ No newline at end of file