diff --git a/s/contact.tpl.html b/s/contact.tpl.html new file mode 100644 index 0000000..e69de29 diff --git a/s/favicon.gif b/s/favicon.gif new file mode 100644 index 0000000..32ed74e Binary files /dev/null and b/s/favicon.gif differ diff --git a/s/how.tpl.html b/s/how.tpl.html new file mode 100644 index 0000000..1840846 --- /dev/null +++ b/s/how.tpl.html @@ -0,0 +1,32 @@ + + + f0ck me! but how? + + + + +
+

irc.n0xy.net +6697 (ssl only) #f0ck

+

SHA256 Fingerprint=10:2F:90:45:53:B9:1E:F8:7A:B4:7B:AE:03:70:4C:84:70:7A:A9:EE:11:49:2B:79:A0:7A:2D:01:B2:E6:0F:41

+

Don't have a desktop client? Why not join our Network via webirc? >>webirc.n0xy.net

+ +
    +
  1. Do not spread CP of any kind at this server (loli included!).
  2. +
  3. Do not attack against users or infrastructure of this server.
  4. +
  5. Do not attack against any systems throught this server.
  6. +
  7. Do not spread worms, viruses or any other kind of malware at this server.
  8. +
  9. Do not try to sell, buy, or spread credit-card, banking etc info at this server!
  10. +
  11. Do not spread content, that is at the moment illegal at the hosting country, or your country.
  12. +
  13. Don't be an asshole, no butthurt allowed beyond this line ^-^
  14. +
+

how to f0ck you ask?

+

f0ck will f0ck any media link posted in the channel ending with: jpg|gif|png|webm|mp3|mp4

+

If you don't want f0ck to f0ck it put !ignore behind your link. Example: https://retard-journal.com/stupidshit.png !ignore +

f0ck will only f0ck media links with the maximum size of 30MB

+

Don't let f0ck f0ck childporn :( ... please

+ return to main +
+ + \ No newline at end of file diff --git a/s/index.tpl.html b/s/index.tpl.html index 9ad3652..0e3c798 100644 --- a/s/index.tpl.html +++ b/s/index.tpl.html @@ -3,11 +3,11 @@ f0ck me! - + - {% for item in items %} -
+
+ {% for item in items %}
{% endfor %} \ No newline at end of file diff --git a/s/irccat.gif b/s/irccat.gif new file mode 100644 index 0000000..9639afc Binary files /dev/null and b/s/irccat.gif differ diff --git a/s/item.tpl.html b/s/item.tpl.html index 530edff..116b1a6 100644 --- a/s/item.tpl.html +++ b/s/item.tpl.html @@ -3,11 +3,11 @@ {{ id }} - f0ck.me - + -

f0ck.me

[ID: {{ id }} | by: {{ username }}]
+
f0ck.me

{% if item == "video" %} @@ -19,7 +19,7 @@ {% endif %}
-
controls für vor und zurück :^)
+
controls für vor und zurück :^)

src: {{ src }}
dest: {{ dest }}
diff --git a/s/style.css b/s/style.css index 3896c6d..fb54f8b 100644 --- a/s/style.css +++ b/s/style.css @@ -9,40 +9,43 @@ a > img { border: 2px solid #4c4a4a; margin: 0; } - a { color: #9f0; } a:hover { color: #74c100; } - .medium { display: flex; justify-content: center; align-items: center; } - .info { text-align: center; } - .id { text-align: center; padding-bottom: 10px; } - .mrhankyisteinneger { padding: 0; display: block; margin: 0 0 4px 5px; float: left; } - .mrhankyisteinneger:hover { opacity: 0.7; } - .controls { text-align: center; + display: none; +} +.navbar { + text-align: center; +} +.return { + text-align: center; +} +.irc { + margin: 20px; } \ No newline at end of file diff --git a/src/main.js b/src/main.js index 797ff1d..9561f08 100644 --- a/src/main.js +++ b/src/main.js @@ -47,7 +47,7 @@ bot.on('motd', (e) => { bot.on('message', (e) => { var orig = e.message; - if(orig.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi) && e.channel.getName() == "#f0ck") { // shitpostcatcher + if(orig.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi)/* && e.channel.getName() == "#f0ck"*/) { // shitpostcatcher if(!orig.match(/\!ignore$/)) { var tmp = orig.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi); // get links tmp.forEach((entry,i,a) => { @@ -95,6 +95,10 @@ bot.on('message', (e) => { var tmp = getUser(e.user.getNick(), e.network); setTimeout(()=>{ e.reply(tmp); }, 1500); } + else if(orig.match(/^\!reload tpl$/)) { + getTpls(); + e.reply("templates reloaded"); + } }); var getUser = (u, n) => { @@ -172,7 +176,6 @@ http.createServer((req, res) => { var url = req.url.split("/")[1]; if(filePath == './') filePath = './index.html'; - var extname = String(path.extname(filePath)).toLowerCase(); var contentType = 'text/html'; var mimeTypes = { @@ -240,8 +243,18 @@ http.createServer((req, res) => { res.end(tpl(data), 'utf-8'); }); } + else if(filePath == "./how") { + var tpl = swig.compile(templates.how); + res.writeHead(200, { 'Content-Type': 'text/html' }); + res.end(tpl(), 'utf-8'); + } + else if(filePath == "./contact") { + var tpl = swig.compile(templates.contact); + res.writeHead(200, { 'Content-Type': 'text/html' }); + res.end(tpl(), 'utf-8'); + } else if(filePath.match(/^\.\/(b|s|t)\/.*/)) { // file - contentType = mimeTypes[extname] || 'application/octect-stream'; + contentType = mimeTypes[extname]; switch(contentType) { case "video/webm": case "video/mp4": @@ -280,7 +293,7 @@ http.createServer((req, res) => { } } else { - res.writeHead(200, { 'Content-Type': contentType, 'Content-Length': content.length }); + res.writeHead(200, { 'Content-Type': contentType, 'Content-Length': content.length, 'Cache-Control': 'max-age=2592000, public' }); res.end(content, 'utf-8'); } }); @@ -290,7 +303,7 @@ http.createServer((req, res) => { if(error) { if(error.code == 'ENOENT') { res.writeHead(200, { 'Content-Type': contentType }); - res.end('404 - file not found', 'utf-8'); + res.end('404 - f0ck you', 'utf-8'); } else { res.writeHead(500); @@ -305,14 +318,16 @@ http.createServer((req, res) => { } else { // errorpage res.writeHead(404); - res.end('404 - not found', 'utf-8'); + res.end('404 - f0ck you', 'utf-8'); } }).listen(cfg.webserver.port); var getTpls = () => { templates = { "index": fs.readFileSync("./s/index.tpl.html", "utf-8"), - "item": fs.readFileSync("./s/item.tpl.html", "utf-8") + "item": fs.readFileSync("./s/item.tpl.html", "utf-8"), + "how": fs.readFileSync("./s/how.tpl.html", "utf-8"), + "contact": fs.readFileSync("./s/contact.tpl.html", "utf-8") }; }; getTpls(); @@ -330,9 +345,8 @@ var generateThumbs = () => { exec('ffmpegthumbnailer -i'+e.dest+' -o'+outdir+e.id+'.png -a', (error) => { if(error) { bot.send("#f0ck", "failed thumbnail for "+e.id+" ("+e.mime+")", 'n0xy'); - fs.unlink(outdir+e.id+'.png'); - fs.copySync('./s/mp3.png', outdir+e.id+'.png'); - // Standardthumb reinkopieren + fs.unlink(outdir+e.id+'.png'); // + fs.copySync('./s/mp3.png', outdir+e.id+'.png'); // copy standardthumbnail } else { bot.send("#f0ck", "generated thumbnail for "+e.id+" ("+e.mime+")", 'n0xy');