summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-03-31 18:08:27 +0200
committerJules Laplace <julescarbon@gmail.com>2018-03-31 18:08:27 +0200
commit89f3dcb22f20d6914e451d4a2c6caa20d8e4969e (patch)
treeaf8c435d1934701d3d2ffa1090923ea4a5076ec8 /lib
parent731001ca8d6b2af6093cf706a0d7c596b6bddac8 (diff)
append
Diffstat (limited to 'lib')
-rw-r--r--lib/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index 781ac04..d0f5e76 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -103,6 +103,11 @@ site.init = function(){
tag: sanitize(req.body.tag) || 'plop',
remote_addr: req.ip || '127.0.0.1',
}).then(function(image){
+ if (process.env.SEND_ASCII && req.body.ascii && req.body.ascii.length < 800 * 100) {
+ var stream = fs.createWriteStream("/home/panke/irc/irc.asdf.us/#ascii/in", {flags:'a'})
+ stream.write(req.body.ascii + "\n")
+ stream.end()
+ }
res.json({
success: true,
size: req.file.size,