summaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-11-15 17:59:39 -0500
committerJules Laplace <jules@okfoc.us>2016-11-15 17:59:39 -0500
commit61b488785f62aea0cd5f932e7267acd3a12ecb87 (patch)
treee2546ff5a73e19d4ef62fd2d111a1be60d3281a8 /lib/index.js
parent7553643e39a16bacfb2ac6563a8558ac475042bc (diff)
le file upload
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/index.js b/lib/index.js
index a9571f8..6da1c24 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,7 +20,13 @@ router.post("/_irc/image", multer_upload.single('image'), function(req, res){
res.json({ error: err })
},
success: function(url){
- server.io.send("link", {url: url})
+ console.log("SUCCSES!")
+ console.log(url)
+ panda.say(panda.channels[0], url)
+ server.io.emit("link", {
+ nick: panda.nick,
+ url: url,
+ })
}
})
})
@@ -40,7 +46,6 @@ router.post("/_irc/post", function(req, res){
})
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,