updated 'not connected' messages

This commit is contained in:
Baipyrus 2023-01-20 16:00:01 +01:00
parent 5da3ef5ffa
commit af092439a3

View File

@ -159,7 +159,7 @@ function cmd_msg(input) {
if (input === undefined) if (input === undefined)
return "No recipient was given!"; return "No recipient was given!";
if (!user.connected) if (!user.connected)
return "You are not connected!"; return "You are not connected! Use the 'nick' command to connect using your username.";
if (user.name === "") if (user.name === "")
return "You do not have a name!"; return "You do not have a name!";
// Get recipient username without spaces and pretext // Get recipient username without spaces and pretext
@ -196,7 +196,7 @@ function cmd_exit(error) {
// List all users to be able to chat with // List all users to be able to chat with
function cmd_ls() { function cmd_ls() {
if (!user.connected) if (!user.connected)
return "You are not connected!"; return "You are not connected! Use the 'nick' command to connect using your username.";
requestUsernames(); requestUsernames();
return null; return null;
} }