This commit is contained in:
Kim Ravn Hansen
2025-09-15 12:33:08 +02:00
parent c19557ba33
commit 63dff39be2
12 changed files with 84 additions and 59 deletions

View File

@@ -1,6 +1,8 @@
import { crackdown } from "../utils/crackdown.js";
import { parseArgs } from "../utils/parseArgs.js";
import { MessageType } from "../utils/messages.js";
import { sprintf } from "sprintf-js";
import { Config } from "../config.js";
/** Regex to validate if a :help [topic] command i entered correctly */
const helpRegex = /^:help(?:\s+(.*))?$/;
@@ -72,7 +74,10 @@ class MUDClient {
connect() {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const wsUrl = `${protocol}//${window.location.host}`;
const wsUrl = `${protocol}//${window.location.host}`.replace(/:\d+$/, Config.port);
console.log(window.location);
this.updateStatus("Connecting...", "connecting");