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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user