From f71541de974ec9467f6e35d3559c488aea6ac2e1 Mon Sep 17 00:00:00 2001 From: Kasalehlia <kasalehlia@clonejo.de> Date: Mon, 16 Jan 2017 21:30:28 +0100 Subject: [PATCH] redirected irc to kasas bouncer --- modules/irc.js | 15 +++++++++++---- public/css/infodisplay.css | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/irc.js b/modules/irc.js index 552867b..aa7a050 100644 --- a/modules/irc.js +++ b/modules/irc.js @@ -2,15 +2,22 @@ var irc = require('irc'); var CHANNEL = '#stratum0'; +var PW = 'Fagee9ie' + module.exports = function (io) { - var client = new irc.Client('chat.freenode.net', 'infodisplay', { - channels: [CHANNEL] + var client = new irc.Client('bouncer.ksal.de', 'infodisplay', { + channels: [CHANNEL], + port: 28921, + secure: true, + selfSigned: true, + userName: 'infodisplay/Freenode', + password: PW }); var content = []; client.addListener('message', function (from, to, message) { - if (to != CHANNEL) {return;} + if (to != CHANNEL || from === undefined) {return;} message = message.replace(/</g,'<').replace(/>/g,'>'); - content.push('<p> <span>'+from+'</span> '+message+'</p>'); + content.push('<p><span>'+from+'</span> '+message+'</p>'); if (content.length > 25) { content.shift(); } diff --git a/public/css/infodisplay.css b/public/css/infodisplay.css index 57c6b64..f887bf8 100644 --- a/public/css/infodisplay.css +++ b/public/css/infodisplay.css @@ -17,6 +17,7 @@ body > div { #irc p { margin: 0px; line-height: 120%; + padding-left: 1em; } h2 { margin: 0px; @@ -33,6 +34,7 @@ h3 { flex-direction: column; height: calc(100% - 46px); font-family: monospace; + overflow: hidden; } #irc p span { color: #268bd2; -- GitLab