Allow anonymous users to send commands.
This commit is contained in:
+5
-5
@@ -650,11 +650,6 @@ function addToChatbox(peerId, nick, message, me){
|
|||||||
|
|
||||||
function handleInput() {
|
function handleInput() {
|
||||||
let username = getUsername();
|
let username = getUsername();
|
||||||
if(!username) {
|
|
||||||
displayError("Sorry, you're anonymous, you cannot chat");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let input = document.getElementById('input');
|
let input = document.getElementById('input');
|
||||||
let data = input.value;
|
let data = input.value;
|
||||||
input.value = '';
|
input.value = '';
|
||||||
@@ -723,6 +718,11 @@ function handleInput() {
|
|||||||
me = false;
|
me = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!username) {
|
||||||
|
displayError("Sorry, you're anonymous, you cannot chat");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
addToChatbox(myid, username, message, me);
|
addToChatbox(myid, username, message, me);
|
||||||
send({
|
send({
|
||||||
type: 'chat',
|
type: 'chat',
|
||||||
|
|||||||
Reference in New Issue
Block a user