Repository: thelounge/thelounge
Pull request #4235 (2021-05-22 01:23:02)

Render styling for colored host masks
On some IRC networks, users have vanity host masks with colors or other text styling.
Rizon is one such network.

For example, a user connecting from `127.0.0.1` could instead have the host 
`angerson@this.is.my.host.mask`. `this.is.my.host.mask` may have IRC color code
characters in it, which without this change would be displayed as a bunch of jumbled
garbage in the `/whois` response or join/part messages.

Resolves https://github.com/thelounge/thelounge/issues/4232.

angerson: Most of the other components (joins, parts, etc.) also lack this styling. Would the correct thing to do be to wrap every `{{ message.hostmask }}` with a `ParsedMessage`? I don't think a more abstract solution is necessary, because it's only hostmasks that are likely to be like this.
MaxLeiter: Thanks for the PR, @angerson! It seems like there's a small linting error in `client/components/MessageTypes/chghost.vue`. Can you address that and squash your commits? 

Patch:
diff --git a/.eslintrc.yml b/.eslintrc.yml
index d59c3b80..b67991b5 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -2,7 +2,7 @@
 root: true
 
 parserOptions:
-  ecmaVersion: 2020
+  ecmaVersion: 2018
 
 env:
   es6: true
diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md
index 22efc625..da44fb06 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"
 ---
 
-<!-- Have a question? Join #thelounge on Libera.Chat -->
+<!-- Have a question? Join #thelounge on freenode -->
 
 - _Node version:_
 - _Browser version:_
diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md
index a0ea13c3..51f7a656 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"
 ---
 
-<!-- Have a question? Join #thelounge on Libera.Chat. -->
+<!-- Have a question? Join #thelounge on freenode. -->
 <!-- Make sure to check the existing issues prior to submitting your suggestion. -->
 
 ### Feature Description
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index a06afb86..6534742d 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 Libera.Chat to ask a question before creating an issue"
+    about: "Join #thelounge on Freenode to ask a question before creating an issue"
diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md
index 62c3148e..1fbda01d 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 Libera.Chat channel `#thelounge`. You might not get an answer
+- Find us on the Freenode 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 66d08464..8ea89439 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,8 @@
 </p>
 <p align="center">
 	<a href="https://demo.thelounge.chat/"><img
-		alt="#thelounge IRC channel on Libera.Chat"
-		src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a>
+		alt="#thelounge IRC channel on freenode"
+		src="https://img.shields.io/badge/freenode-%23thelounge-415364.svg?colorA=ff9e18"></a>
 	<a href="https://yarn.pm/thelounge"><img
 		alt="npm version"
 		src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a>
diff --git a/SECURITY.md b/SECURITY.md
index 7c292045..909e8718 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 Libera.Chat channel,
+- On IRC, send a private message to any voiced user on our Freenode channel,
   `#thelounge`.
 - By email, send us your report at <security@thelounge.chat>.
diff --git a/client/components/ChatInput.vue b/client/components/ChatInput.vue
index f0dbb14b..d12b9405 100644
--- a/client/components/ChatInput.vue
+++ b/client/components/ChatInput.vue
@@ -183,10 +183,6 @@ export default {
 		},
 		setInputSize() {
 			this.$nextTick(() => {
-				if (!this.$refs.input) {
-					return;
-				}
-
 				const style = window.getComputedStyle(this.$refs.input);
 				const lineHeight = parseFloat(style.lineHeight, 10) || 1;
 
diff --git a/client/components/MessageSearchForm.vue b/client/components/MessageSearchForm.vue
index 340d7e2d..233e099f 100644
--- a/client/components/MessageSearchForm.vue
+++ b/client/components/MessageSearchForm.vue
@@ -104,10 +104,6 @@ export default {
 	mounted() {
 		this.searchInput = this.$route.query.q;
 		this.searchOpened = this.onSearchPage;
-
-		if (!this.searchInput) {
-			this.$refs.searchInputField.focus();
-		}
 	},
 	methods: {
 		closeSearch() {
diff --git a/client/components/MessageTypes/chghost.vue b/client/components/MessageTypes/chghost.vue
index ef8e2f83..e54c245d 100644
--- a/client/components/MessageTypes/chghost.vue
+++ b/client/components/MessageTypes/chghost.vue
@@ -6,17 +6,20 @@
 			>username to <b>{{ message.new_ident }}</b></span
 		>
 		<span v-if="message.new_host"
-			>hostname to <i class="hostmask">{{ message.new_host }}</i></span
-		>
+			>hostname to
+			<i class="hostmask"><ParsedMessage :network="network" :text="message.new_host" /></i
+		></span>
 	</span>
 </template>
 
 <script>
+import ParsedMessage from "../ParsedMessage.vue";
 import Username from "../Username.vue";
 
 export default {
 	name: "MessageTypeChangeHost",
 	components: {
+		ParsedMessage,
 		Username,
 	},
 	props: {
diff --git a/client/components/MessageTypes/join.vue b/client/components/MessageTypes/join.vue
index 882726d6..9e635742 100644
--- a/client/components/MessageTypes/join.vue
+++ b/client/components/MessageTypes/join.vue
@@ -1,7 +1,7 @@
 <template>
 	<span class="content">
 		<Username :user="message.from" />
-		<i class="hostmask"> ({{ message.hostmask }})</i>
+		<i class="hostmask"> (<ParsedMessage :network="network" :text="message.hostmask" />)</i>
 		<template v-if="message.account">
 			<i class="account"> [{{ message.account }}]</i>
 		</template>
@@ -13,11 +13,13 @@
 </template>
 
 <script>
+import ParsedMessage from "../ParsedMessage.vue";
 import Username from "../Username.vue";
 
 export default {
 	name: "MessageTypeJoin",
 	components: {
+		ParsedMessage,
 		Username,
 	},
 	props: {
diff --git a/client/components/MessageTypes/part.vue b/client/components/MessageTypes/part.vue
index b4d31994..b2b18c2a 100644
--- a/client/components/MessageTypes/part.vue
+++ b/client/components/MessageTypes/part.vue
@@ -1,7 +1,8 @@
 <template>
 	<span class="content">
 		<Username :user="message.from" />
-		<i class="hostmask"> ({{ message.hostmask }})</i> has left the channel
+		<i class="hostmask"> (<ParsedMessage :network="network" :text="message.hostmask" />)</i> has
+		left the channel
 		<i v-if="message.text" class="part-reason"
 			>(<ParsedMessage :network="network" :message="message" />)</i
 		>
diff --git a/client/components/MessageTypes/quit.vue b/client/components/MessageTypes/quit.vue
index 5376029d..a34cd58c 100644
--- a/client/components/MessageTypes/quit.vue
+++ b/client/components/MessageTypes/quit.vue
@@ -1,7 +1,8 @@
 <template>
 	<span class="content">
 		<Username :user="message.from" />
-		<i class="hostmask"> ({{ message.hostmask }})</i> has quit
+		<i class="hostmask"> (<ParsedMessage :network="network" :text="message.hostmask" />)</i> has
+		quit
 		<i v-if="message.text" class="quit-reason"
 			>(<ParsedMessage :network="network" :message="message" />)</i
 		>
diff --git a/client/components/MessageTypes/whois.vue b/client/components/MessageTypes/whois.vue
index b198a823..5a080788 100644
--- a/client/components/MessageTypes/whois.vue
+++ b/client/components/MessageTypes/whois.vue
@@ -12,7 +12,12 @@
 			</template>
 
 			<dt>Host mask:</dt>
-			<dd class="hostmask">{{ message.whois.ident }}@{{ message.whois.hostname }}</dd>
+			<dd class="hostmask">
+				<ParsedMessage
+					:network="network"
+					:text="message.whois.ident + '@' + message.whois.hostname"
+				/>
+			</dd>
 
 			<template v-if="message.whois.actual_hostname">
 				<dt>Actual host:</dt>
diff --git a/client/components/Special/ListBans.vue b/client/components/Special/ListBans.vue
index d0e52cb4..781be944 100644
--- a/client/components/Special/ListBans.vue
+++ b/client/components/Special/ListBans.vue
@@ -9,7 +9,7 @@
 		</thead>
 		<tbody>
 			<tr v-for="ban in channel.data" :key="ban.hostmask">
-				<td class="hostmask">{{ ban.hostmask }}</td>
+				<td class="hostmask"><ParsedMessage :network="network" :text="ban.hostmask" /></td>
 				<td class="banned_by">{{ ban.banned_by }}</td>
 				<td class="banned_at">{{ localetime(ban.banned_at) }}</td>
 			</tr>
@@ -18,10 +18,14 @@
 </template>
 
 <script>
+import ParsedMessage from "../ParsedMessage.vue";
 import localetime from "../../js/helpers/localetime";
 
 export default {
 	name: "ListBans",
+	components: {
+		ParsedMessage,
+	},
 	props: {
 		network: Object,
 		channel: Object,
diff --git a/client/components/Special/ListIgnored.vue b/client/components/Special/ListIgnored.vue
index 0764dc22..be672266 100644
--- a/client/components/Special/ListIgnored.vue
+++ b/client/components/Special/ListIgnored.vue
@@ -8,7 +8,7 @@
 		</thead>
 		<tbody>
 			<tr v-for="user in channel.data" :key="user.hostmask">
-				<td class="hostmask">{{ user.hostmask }}</td>
+				<td class="hostmask"><ParsedMessage :network="network" :text="user.hostmask" /></td>
 				<td class="when">{{ localetime(user.when) }}</td>
 			</tr>
 		</tbody>
@@ -16,10 +16,14 @@
 </template>
 
 <script>
+import ParsedMessage from "../ParsedMessage.vue";
 import localetime from "../../js/helpers/localetime";
 
 export default {
 	name: "ListIgnored",
+	components: {
+		ParsedMessage,
+	},
 	props: {
 		network: Object,
 		channel: Object,
diff --git a/client/components/Special/ListInvites.vue b/client/components/Special/ListInvites.vue
index 6d85b7fd..9f59645e 100644
--- a/client/components/Special/ListInvites.vue
+++ b/client/components/Special/ListInvites.vue
@@ -9,7 +9,9 @@
 		</thead>
 		<tbody>
 			<tr v-for="invite in channel.data" :key="invite.hostmask">
-				<td class="hostmask">{{ invite.hostmask }}</td>
+				<td class="hostmask">
+					<ParsedMessage :network="network" :text="invite.hostmask" />
+				</td>
 				<td class="invitened_by">{{ invite.invited_by }}</td>
 				<td class="invitened_at">{{ localetime(invite.invited_at) }}</td>
 			</tr>
@@ -18,10 +20,14 @@
 </template>
 
 <script>
+import ParsedMessage from "../ParsedMessage.vue";
 import localetime from "../../js/helpers/localetime";
 
 export default {
 	name: "ListInvites",
+	components: {
+		ParsedMessage,
+	},
 	props: {
 		network: Object,
 		channel: Object,
diff --git a/client/components/Windows/Help.vue b/client/components/Windows/Help.vue
index 8015bbf8..7305b1ec 100644
--- a/client/components/Windows/Help.vue
+++ b/client/components/Windows/Help.vue
@@ -673,15 +673,6 @@
 				</div>
 			</div>
 
-			<div class="help-item">
-				<div class="subject">
-					<code>/search query</code>
-				</div>
-				<div class="description">
-					<p>Search for messages in the current channel / user</p>
-				</div>
-			</div>
-
 			<div class="help-item">
 				<div class="subject">
 					<code>/topic [newtopic]</code>
diff --git a/client/js/commands/search.js b/client/js/commands/search.js
deleted file mode 100644
index 31e8c49b..00000000
--- a/client/js/commands/search.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-import store from "../store";
-import {router} from "../router";
-
-function input(args) {
-	router.push({
-		name: "SearchResults",
-		params: {
-			id: store.state.activeChannel.channel.id,
-		},
-		query: {
-			q: args.join(" "),
-		},
-	});
-
-	return true;
-}
-
-export default {input};
diff --git a/client/js/socket-events/more.js b/client/js/socket-events/more.js
index 34abf2c5..5acaa3cb 100644
--- a/client/js/socket-events/more.js
+++ b/client/js/socket-events/more.js
@@ -6,24 +6,17 @@ import socket from "../socket";
 import store from "../store";
 
 socket.on("more", function (data) {
-	const channel = store.getters.findChannel(data.chan)?.channel;
+	const channel = store.getters.findChannel(data.chan);
 
 	if (!channel) {
 		return;
 	}
 
-	channel.inputHistory = channel.inputHistory.concat(
-		data.messages
-			.filter((m) => m.self && m.text && m.type === "message")
-			.map((m) => m.text)
-			.reverse()
-			.slice(null, 100 - channel.inputHistory.length)
-	);
-	channel.moreHistoryAvailable =
-		data.totalMessages > channel.messages.length + data.messages.length;
-	channel.messages.unshift(...data.messages);
+	channel.channel.moreHistoryAvailable =
+		data.totalMessages > channel.channel.messages.length + data.messages.length;
+	channel.channel.messages.unshift(...data.messages);
 
 	Vue.nextTick(() => {
-		channel.historyLoading = false;
+		channel.channel.historyLoading = false;
 	});
 });
diff --git a/client/js/store.js b/client/js/store.js
index 4c32ce15..c9508fc8 100644
--- a/client/js/store.js
+++ b/client/js/store.js
@@ -190,14 +190,7 @@ const store = new Vuex.Store({
 			// TODO: This should be a mutation
 			channel.pendingMessage = "";
 			channel.inputHistoryPosition = 0;
-
-			channel.inputHistory = [""].concat(
-				channel.messages
-					.filter((m) => m.self && m.text && m.type === "message")
-					.map((m) => m.text)
-					.reverse()
-					.slice(null, 99)
-			);
+			channel.inputHistory = [""];
 			channel.historyLoading = false;
 			channel.scrolledToBottom = true;
 			channel.editTopic = false;
diff --git a/defaults/config.js b/defaults/config.js
index 390f732d..9b21cc84 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
-	// Libera.Chat by default:
+	// Freenode by default:
 	//
 	// ```js
 	// defaults: {
-	//   name: "Libera.Chat",
-	//   host: "irc.libera.chat",
+	//   name: "Freenode",
+	//   host: "chat.freenode.net",
 	//   port: 6697,
 	//   password: "",
 	//   tls: true,
@@ -248,8 +248,8 @@ module.exports = {
 	// }
 	// ```
 	defaults: {
-		name: "Libera.Chat",
-		host: "irc.libera.chat",
+		name: "Freenode",
+		host: "chat.freenode.net",
 		port: 6697,
 		password: "",
 		tls: true,
diff --git a/src/plugins/inputs/index.js b/src/plugins/inputs/index.js
index 5f012254..911d06cb 100644
--- a/src/plugins/inputs/index.js
+++ b/src/plugins/inputs/index.js
@@ -1,4 +1,4 @@
-const clientSideCommands = ["/collapse", "/expand", "/search"];
+const clientSideCommands = ["/collapse", "/expand"];
 
 const passThroughCommands = [
 	"/as",
diff --git a/src/plugins/irc-events/link.js b/src/plugins/irc-events/link.js
index a5ec18d9..c21a18dc 100644
--- a/src/plugins/irc-events/link.js
+++ b/src/plugins/irc-events/link.js
@@ -222,7 +222,6 @@ function parse(msg, chan, preview, res, client) {
 		case "image/gif":
 		case "image/jpg":
 		case "image/jpeg":
-		case "image/jxl":
 		case "image/webp":
 		case "image/avif":
 			if (!Helper.config.prefetchStorage && Helper.config.disableMediaPreview) {
diff --git a/src/plugins/uploader.js b/src/plugins/uploader.js
index e803690f..6f24b6f5 100644
--- a/src/plugins/uploader.js
+++ b/src/plugins/uploader.js
@@ -29,7 +29,6 @@ const inlineContentDispositionTypes = {
 	"image/png": "image.png",
 	"image/webp": "image.webp",
 	"image/avif": "image.avif",
-	"image/jxl": "image.jxl",
 	"text/plain": "text.txt",
 	"video/mp4": "video.mp4",
 	"video/ogg": "video.ogv",


Test patch:
diff --git a/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js b/test/client/js/helpers/ircmessageparser/cleanIrcMessage.js
index 056c039d..2636b29f 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://\x1dirc.example.com\x0f/\x034,8thelounge",
-				expected: "irc://irc.example.com/thelounge",
+				input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge",
+				expected: "irc://freenode.net/thelounge",
 			},
 			{
 				input: "\x02#\x038,9thelounge",
diff --git a/test/client/js/helpers/ircmessageparser/findLinks.js b/test/client/js/helpers/ircmessageparser/findLinks.js
index 3f0c1ece..9effda56 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://irc.example.com/thelounge";
+		const input = "irc://freenode.net/thelounge";
 		const expected = [
 			{
 				start: 0,
-				end: 31,
-				link: "irc://irc.example.com/thelounge",
+				end: 28,
+				link: "irc://freenode.net/thelounge",
 			},
 		];
 
diff --git a/test/client/js/helpers/parse.js b/test/client/js/helpers/parse.js
index 79171afa..f4902abe 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://irc.example.com/thelounge",
+				input: "irc://freenode.net/thelounge",
 				expected:
-					'<a href="irc://irc.example.com/thelounge" dir="auto" target="_blank" rel="noopener">' +
-					"irc://irc.example.com/thelounge" +
+					'<a href="irc://freenode.net/thelounge" dir="auto" target="_blank" rel="noopener">' +
+					"irc://freenode.net/thelounge" +
 					"</a>",
 			},
 			{
@@ -416,12 +416,12 @@ describe("IRC formatted message parser", () => {
 	it("should go bonkers like mirc", async () => {
 		const testCases = [
 			{
-				input: "\x02irc\x0f://\x1dirc.example.com\x0f/\x034,8thelounge",
+				input: "\x02irc\x0f://\x1dfreenode.net\x0f/\x034,8thelounge",
 				expected:
-					'<a href="irc://irc.example.com/thelounge" dir="auto" target="_blank" rel="noopener">' +
+					'<a href="irc://freenode.net/thelounge" dir="auto" target="_blank" rel="noopener">' +
 					'<span class="irc-bold">irc</span>' +
 					"://" +
-					'<span class="irc-italic">irc.example.com</span>' +
+					'<span class="irc-italic">freenode.net</span>' +
 					"/" +
 					'<span class="irc-fg4 irc-bg8">thelounge</span>' +
 					"</a>",
diff --git a/test/fixtures/.thelounge/config.js b/test/fixtures/.thelounge/config.js
index 9767acc9..cbc7b926 100644
--- a/test/fixtures/.thelounge/config.js
+++ b/test/fixtures/.thelounge/config.js
@@ -2,8 +2,6 @@
 
 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";
diff --git a/test/models/network.js b/test/models/network.js
index e1273f29..6d6d8119 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("irc.example.com");
+			expect(network.host).to.equal("chat.freenode.net");
 			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("irc.example.com");
+			expect(network2.host).to.equal("chat.freenode.net");
 
 			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: "#foo"});
+			const newChan = new Chan({name: "#freenode"});
 			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: "foo",
+				name: "freenode",
 			});
 
-			const newChan = new Chan({name: "#foo"});
+			const newChan = new Chan({name: "#freenode"});
 			network.addChannel(newChan);
 
-			expect(network.channels[0].name).to.equal("foo");
+			expect(network.channels[0].name).to.equal("freenode");
 			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: "#foo"});
+			const newChan = new Chan({name: "#freenode"});
 			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: "#foo"});
+			const newChan = new Chan({name: "#freenode"});
 			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: "foo",
+				name: "freenode",
 				channels: [],
 			});