Add Admin Opcode 25 : Send Server Messages (#19)

* Add Admin Code 25 : XSS Message As Server (why?)

Added the ability to send messages from the server name (without username), with XSS. 
Accepts 1 string argument : message text

* remove redundant switch statement and add check for msgArr length

---------

Co-authored-by: Elijah R <62162399+elijahr2411@users.noreply.github.com>
This commit is contained in:
NonameVM
2024-04-11 20:40:04 +03:00
committed by GitHub
parent 5d4f9b472e
commit 223ff614d1

View File

@@ -681,6 +681,12 @@ export default class WSServer {
break;
}
break;
case "25":
if (client.rank !== Rank.Admin || msgArr.length !== 3)
return;
this.clients.forEach(c => c.sendMsg(guacutils.encode("chat", "", msgArr[2])));
break;
}
break;