From 42bafe71655a73cfcbfb15043f39963f0cd9a2b2 Mon Sep 17 00:00:00 2001 From: Mateusz Hajder <6783135+mhajder@users.noreply.github.com> Date: Sun, 23 May 2021 16:40:08 +0200 Subject: [PATCH 1/4] Change the IRC server to Libera.Chat --- .github/ISSUE_TEMPLATE/Bug_Report.md | 2 +- .github/ISSUE_TEMPLATE/Feature_Request.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/SUPPORT.md | 2 +- README.md | 4 ++-- SECURITY.md | 2 +- defaults/config.js | 10 +++++----- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md index da44fb06..22efc625 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -4,7 +4,7 @@ about: Create a bug report labels: "Type: Bug" --- - + - _Node version:_ - _Browser version:_ diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md index 51f7a656..a0ea13c3 100644 --- a/.github/ISSUE_TEMPLATE/Feature_Request.md +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -4,7 +4,7 @@ about: Request a new feature labels: "Type: Feature" --- - + ### Feature Description diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 6534742d..a06afb86 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -13,4 +13,4 @@ contact_links: - name: General support url: https://demo.thelounge.chat/?join=%23thelounge - about: "Join #thelounge on Freenode to ask a question before creating an issue" + about: "Join #thelounge on Libera.Chat to ask a question before creating an issue" diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 1fbda01d..62c3148e 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -6,6 +6,6 @@ need help, you have a few options: - Check out [existing questions on Stack Overflow](https://stackoverflow.com/questions/tagged/thelounge) to see if yours has been answered before. If not, feel free to [ask for a new question](https://stackoverflow.com/questions/ask?tags=thelounge) (using `thelounge` tag so that other people can easily find it). -- Find us on the Freenode channel `#thelounge`. You might not get an answer +- Find us on the Libera.Chat channel `#thelounge`. You might not get an answer right away, but this channel is full of nice people who will be happy to help you. diff --git a/README.md b/README.md index 8ea89439..66d08464 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@

#thelounge IRC channel on freenode + alt="#thelounge IRC channel on Libera.Chat" + src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"> npm version diff --git a/SECURITY.md b/SECURITY.md index 909e8718..7c292045 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,6 +4,6 @@ - Contact us privately first, in a [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure) manner. -- On IRC, send a private message to any voiced user on our Freenode channel, +- On IRC, send a private message to any voiced user on our Libera.Chat channel, `#thelounge`. - By email, send us your report at . diff --git a/defaults/config.js b/defaults/config.js index 9b21cc84..390f732d 100644 --- a/defaults/config.js +++ b/defaults/config.js @@ -231,12 +231,12 @@ module.exports = { // - `join`: Comma-separated list of channels to auto-join once connected. // // This value is set to connect to the official channel of The Lounge on - // Freenode by default: + // Libera.Chat by default: // // ```js // defaults: { - // name: "Freenode", - // host: "chat.freenode.net", + // name: "Libera.Chat", + // host: "irc.libera.chat", // port: 6697, // password: "", // tls: true, @@ -248,8 +248,8 @@ module.exports = { // } // ``` defaults: { - name: "Freenode", - host: "chat.freenode.net", + name: "Libera.Chat", + host: "irc.libera.chat", port: 6697, password: "", tls: true, From af236dd280abf403e1e747fb738f7e9246046435 Mon Sep 17 00:00:00 2001 From: Mateusz Hajder <6783135+mhajder@users.noreply.github.com> Date: Wed, 26 May 2021 13:41:33 +0200 Subject: [PATCH 2/4] Add the default IRC network for tests --- test/fixtures/.thelounge/config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/fixtures/.thelounge/config.js b/test/fixtures/.thelounge/config.js index cbc7b926..9767acc9 100644 --- a/test/fixtures/.thelounge/config.js +++ b/test/fixtures/.thelounge/config.js @@ -2,6 +2,8 @@ var config = require("../../../defaults/config.js"); +config.defaults.name = "Example IRC Server"; +config.defaults.host = "irc.example.com"; config.public = true; config.prefetch = true; config.host = config.bind = "127.0.0.1"; From 28c413319f60da47afc2441e97f072338841b560 Mon Sep 17 00:00:00 2001 From: Mateusz Hajder <6783135+mhajder@users.noreply.github.com> Date: Wed, 26 May 2021 13:43:06 +0200 Subject: [PATCH 3/4] Change IRC server and channels in tests to more generic --- .../ircmessageparser/cleanIrcMessage.js | 4 ++-- .../js/helpers/ircmessageparser/findLinks.js | 4 ++-- test/client/js/helpers/parse.js | 12 ++++++------ test/models/network.js | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js b/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js index 2636b29f..056c039d 100644 --- a/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js +++ b/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js @@ -55,8 +55,8 @@ describe("cleanIrcMessage", function () { expected: "bold bold", }, { - input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge", - expected: "irc://freenode.net/thelounge", + input: "\x02irc\x0f://\x1dirc.example.com\x0f/\x034,8thelounge", + expected: "irc://irc.example.com/thelounge", }, { input: "\x02#\x038,9thelounge", diff --git a/test/client/js/helpers/ircmessageparser/findLinks.js b/test/client/js/helpers/ircmessageparser/findLinks.js index 9effda56..d1c9a27f 100644 --- a/test/client/js/helpers/ircmessageparser/findLinks.js +++ b/test/client/js/helpers/ircmessageparser/findLinks.js @@ -8,12 +8,12 @@ const { describe("findLinks", () => { it("should find url", () => { - const input = "irc://freenode.net/thelounge"; + const input = "irc://irc.example.com/thelounge"; const expected = [ { start: 0, end: 28, - link: "irc://freenode.net/thelounge", + link: "irc://irc.example.com/thelounge", }, ]; diff --git a/test/client/js/helpers/parse.js b/test/client/js/helpers/parse.js index f4902abe..79171afa 100644 --- a/test/client/js/helpers/parse.js +++ b/test/client/js/helpers/parse.js @@ -63,10 +63,10 @@ describe("IRC formatted message parser", () => { it("should find urls", async () => { const testCases = [ { - input: "irc://freenode.net/thelounge", + input: "irc://irc.example.com/thelounge", expected: - '' + - "irc://freenode.net/thelounge" + + '' + + "irc://irc.example.com/thelounge" + "", }, { @@ -416,12 +416,12 @@ describe("IRC formatted message parser", () => { it("should go bonkers like mirc", async () => { const testCases = [ { - input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge", + input: "\x02irc\x0f://\x1dirc.example.com\x0f/\x034,8thelounge", expected: - '' + + '' + 'irc' + "://" + - 'freenode.net' + + 'irc.example.com' + "/" + 'thelounge' + "", diff --git a/test/models/network.js b/test/models/network.js index 6d6d8119..e1273f29 100644 --- a/test/models/network.js +++ b/test/models/network.js @@ -91,7 +91,7 @@ describe("Network", function () { rejectUnauthorized: false, }); expect(network.validate()).to.be.true; - expect(network.host).to.equal("chat.freenode.net"); + expect(network.host).to.equal("irc.example.com"); expect(network.port).to.equal(6697); expect(network.tls).to.be.true; expect(network.rejectUnauthorized).to.be.true; @@ -103,7 +103,7 @@ describe("Network", function () { host: "some.fake.tld", }); expect(network2.validate()).to.be.true; - expect(network2.host).to.equal("chat.freenode.net"); + expect(network2.host).to.equal("irc.example.com"); Helper.config.lockNetwork = false; }); @@ -265,7 +265,7 @@ describe("Network", function () { // Lobby and initial channel expect(network.channels.length).to.equal(2); - const newChan = new Chan({name: "#freenode"}); + const newChan = new Chan({name: "#foo"}); network.addChannel(newChan); expect(network.channels.length).to.equal(3); @@ -278,13 +278,13 @@ describe("Network", function () { const network = new Network({ channels: [chan1, chan2, chan3], - name: "freenode", + name: "foo", }); - const newChan = new Chan({name: "#freenode"}); + const newChan = new Chan({name: "#foo"}); network.addChannel(newChan); - expect(network.channels[0].name).to.equal("freenode"); + expect(network.channels[0].name).to.equal("foo"); expect(network.channels[1]).to.equal(chan1); expect(network.channels[2]).to.equal(newChan); expect(network.channels[3]).to.equal(chan2); @@ -299,7 +299,7 @@ describe("Network", function () { channels: [chan1, chan2], }); - const newChan = new Chan({name: "#freenode"}); + const newChan = new Chan({name: "#foo"}); network.addChannel(newChan); expect(network.channels[1]).to.equal(chan1); @@ -393,7 +393,7 @@ describe("Network", function () { channels: [banlist, chan1, user1], }); - const newChan = new Chan({name: "#freenode"}); + const newChan = new Chan({name: "#foo"}); network.addChannel(newChan); expect(network.channels[1]).to.equal(newChan); @@ -404,7 +404,7 @@ describe("Network", function () { it("should never add something in front of the lobby", function () { const network = new Network({ - name: "freenode", + name: "foo", channels: [], }); From 6f7fd800440078651ac4a40b559946cbbb4a21f5 Mon Sep 17 00:00:00 2001 From: Mateusz Hajder <6783135+mhajder@users.noreply.github.com> Date: Wed, 26 May 2021 13:59:04 +0200 Subject: [PATCH 4/4] Fix length of the link in tests --- test/client/js/helpers/ircmessageparser/findLinks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/client/js/helpers/ircmessageparser/findLinks.js b/test/client/js/helpers/ircmessageparser/findLinks.js index d1c9a27f..3f0c1ece 100644 --- a/test/client/js/helpers/ircmessageparser/findLinks.js +++ b/test/client/js/helpers/ircmessageparser/findLinks.js @@ -12,7 +12,7 @@ describe("findLinks", () => { const expected = [ { start: 0, - end: 28, + end: 31, link: "irc://irc.example.com/thelounge", }, ];