Merge pull request #4238 from mhajder/master

Change the IRC server to Libera.Chat
This commit is contained in:
Pavel Djundik 2021-05-26 15:03:23 +03:00 committed by GitHub
commit fa854fde78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 34 additions and 32 deletions

View File

@ -4,7 +4,7 @@ about: Create a bug report
labels: "Type: Bug" labels: "Type: Bug"
--- ---
<!-- Have a question? Join #thelounge on freenode --> <!-- Have a question? Join #thelounge on Libera.Chat -->
- _Node version:_ - _Node version:_
- _Browser version:_ - _Browser version:_

View File

@ -4,7 +4,7 @@ about: Request a new feature
labels: "Type: Feature" labels: "Type: Feature"
--- ---
<!-- Have a question? Join #thelounge on freenode. --> <!-- Have a question? Join #thelounge on Libera.Chat. -->
<!-- Make sure to check the existing issues prior to submitting your suggestion. --> <!-- Make sure to check the existing issues prior to submitting your suggestion. -->
### Feature Description ### Feature Description

View File

@ -13,4 +13,4 @@ contact_links:
- name: General support - name: General support
url: https://demo.thelounge.chat/?join=%23thelounge 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"

2
.github/SUPPORT.md vendored
View File

@ -6,6 +6,6 @@ need help, you have a few options:
- Check out [existing questions on Stack Overflow](https://stackoverflow.com/questions/tagged/thelounge) - 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) 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). (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 right away, but this channel is full of nice people who will be happy to
help you. help you.

View File

@ -20,8 +20,8 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://demo.thelounge.chat/"><img <a href="https://demo.thelounge.chat/"><img
alt="#thelounge IRC channel on freenode" alt="#thelounge IRC channel on Libera.Chat"
src="https://img.shields.io/badge/freenode-%23thelounge-415364.svg?colorA=ff9e18"></a> src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a>
<a href="https://yarn.pm/thelounge"><img <a href="https://yarn.pm/thelounge"><img
alt="npm version" alt="npm version"
src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a> src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a>

View File

@ -4,6 +4,6 @@
- Contact us privately first, in a - Contact us privately first, in a
[responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure) [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure)
manner. 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`. `#thelounge`.
- By email, send us your report at <security@thelounge.chat>. - By email, send us your report at <security@thelounge.chat>.

View File

@ -231,12 +231,12 @@ module.exports = {
// - `join`: Comma-separated list of channels to auto-join once connected. // - `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 // This value is set to connect to the official channel of The Lounge on
// Freenode by default: // Libera.Chat by default:
// //
// ```js // ```js
// defaults: { // defaults: {
// name: "Freenode", // name: "Libera.Chat",
// host: "chat.freenode.net", // host: "irc.libera.chat",
// port: 6697, // port: 6697,
// password: "", // password: "",
// tls: true, // tls: true,
@ -248,8 +248,8 @@ module.exports = {
// } // }
// ``` // ```
defaults: { defaults: {
name: "Freenode", name: "Libera.Chat",
host: "chat.freenode.net", host: "irc.libera.chat",
port: 6697, port: 6697,
password: "", password: "",
tls: true, tls: true,

View File

@ -55,8 +55,8 @@ describe("cleanIrcMessage", function () {
expected: "bold bold", expected: "bold bold",
}, },
{ {
input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge", input: "\x02irc\x0f://\x1dirc.example.com\x0f/\x034,8thelounge",
expected: "irc://freenode.net/thelounge", expected: "irc://irc.example.com/thelounge",
}, },
{ {
input: "\x02#\x038,9thelounge", input: "\x02#\x038,9thelounge",

View File

@ -8,12 +8,12 @@ const {
describe("findLinks", () => { describe("findLinks", () => {
it("should find url", () => { it("should find url", () => {
const input = "irc://freenode.net/thelounge"; const input = "irc://irc.example.com/thelounge";
const expected = [ const expected = [
{ {
start: 0, start: 0,
end: 28, end: 31,
link: "irc://freenode.net/thelounge", link: "irc://irc.example.com/thelounge",
}, },
]; ];

View File

@ -63,10 +63,10 @@ describe("IRC formatted message parser", () => {
it("should find urls", async () => { it("should find urls", async () => {
const testCases = [ const testCases = [
{ {
input: "irc://freenode.net/thelounge", input: "irc://irc.example.com/thelounge",
expected: expected:
'<a href="irc://freenode.net/thelounge" dir="auto" target="_blank" rel="noopener">' + '<a href="irc://irc.example.com/thelounge" dir="auto" target="_blank" rel="noopener">' +
"irc://freenode.net/thelounge" + "irc://irc.example.com/thelounge" +
"</a>", "</a>",
}, },
{ {
@ -416,12 +416,12 @@ describe("IRC formatted message parser", () => {
it("should go bonkers like mirc", async () => { it("should go bonkers like mirc", async () => {
const testCases = [ const testCases = [
{ {
input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge", input: "\x02irc\x0f://\x1dirc.example.com\x0f/\x034,8thelounge",
expected: expected:
'<a href="irc://freenode.net/thelounge" dir="auto" target="_blank" rel="noopener">' + '<a href="irc://irc.example.com/thelounge" dir="auto" target="_blank" rel="noopener">' +
'<span class="irc-bold">irc</span>' + '<span class="irc-bold">irc</span>' +
"://" + "://" +
'<span class="irc-italic">freenode.net</span>' + '<span class="irc-italic">irc.example.com</span>' +
"/" + "/" +
'<span class="irc-fg4 irc-bg8">thelounge</span>' + '<span class="irc-fg4 irc-bg8">thelounge</span>' +
"</a>", "</a>",

View File

@ -2,6 +2,8 @@
var config = require("../../../defaults/config.js"); var config = require("../../../defaults/config.js");
config.defaults.name = "Example IRC Server";
config.defaults.host = "irc.example.com";
config.public = true; config.public = true;
config.prefetch = true; config.prefetch = true;
config.host = config.bind = "127.0.0.1"; config.host = config.bind = "127.0.0.1";

View File

@ -91,7 +91,7 @@ describe("Network", function () {
rejectUnauthorized: false, rejectUnauthorized: false,
}); });
expect(network.validate()).to.be.true; 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.port).to.equal(6697);
expect(network.tls).to.be.true; expect(network.tls).to.be.true;
expect(network.rejectUnauthorized).to.be.true; expect(network.rejectUnauthorized).to.be.true;
@ -103,7 +103,7 @@ describe("Network", function () {
host: "some.fake.tld", host: "some.fake.tld",
}); });
expect(network2.validate()).to.be.true; 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; Helper.config.lockNetwork = false;
}); });
@ -265,7 +265,7 @@ describe("Network", function () {
// Lobby and initial channel // Lobby and initial channel
expect(network.channels.length).to.equal(2); expect(network.channels.length).to.equal(2);
const newChan = new Chan({name: "#freenode"}); const newChan = new Chan({name: "#foo"});
network.addChannel(newChan); network.addChannel(newChan);
expect(network.channels.length).to.equal(3); expect(network.channels.length).to.equal(3);
@ -278,13 +278,13 @@ describe("Network", function () {
const network = new Network({ const network = new Network({
channels: [chan1, chan2, chan3], channels: [chan1, chan2, chan3],
name: "freenode", name: "foo",
}); });
const newChan = new Chan({name: "#freenode"}); const newChan = new Chan({name: "#foo"});
network.addChannel(newChan); 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[1]).to.equal(chan1);
expect(network.channels[2]).to.equal(newChan); expect(network.channels[2]).to.equal(newChan);
expect(network.channels[3]).to.equal(chan2); expect(network.channels[3]).to.equal(chan2);
@ -299,7 +299,7 @@ describe("Network", function () {
channels: [chan1, chan2], channels: [chan1, chan2],
}); });
const newChan = new Chan({name: "#freenode"}); const newChan = new Chan({name: "#foo"});
network.addChannel(newChan); network.addChannel(newChan);
expect(network.channels[1]).to.equal(chan1); expect(network.channels[1]).to.equal(chan1);
@ -393,7 +393,7 @@ describe("Network", function () {
channels: [banlist, chan1, user1], channels: [banlist, chan1, user1],
}); });
const newChan = new Chan({name: "#freenode"}); const newChan = new Chan({name: "#foo"});
network.addChannel(newChan); network.addChannel(newChan);
expect(network.channels[1]).to.equal(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 () { it("should never add something in front of the lobby", function () {
const network = new Network({ const network = new Network({
name: "freenode", name: "foo",
channels: [], channels: [],
}); });