Added browser-side command parser and /high command.
This commit is contained in:
parent
ff69762a1f
commit
77dc865022
4 changed files with 76 additions and 6 deletions
|
|
@ -24,6 +24,9 @@ class chatBox{
|
|||
|
||||
//clickDragger object
|
||||
this.clickDragger = new canopyUXUtils.clickDragger("#chat-panel-drag-handle", "#chat-panel-div");
|
||||
|
||||
//Preprocessor objects
|
||||
this.commandPreprocessor = new commandPreprocessor(client);
|
||||
this.chatPreprocessor = new chatPreprocessor();
|
||||
|
||||
//Element Nodes
|
||||
|
|
@ -115,9 +118,9 @@ class chatBox{
|
|||
this.resizeAspect();
|
||||
}
|
||||
|
||||
async send(event){
|
||||
send(event){
|
||||
if((!event || !event.key || event.key == "Enter") && this.chatPrompt.value){
|
||||
this.client.socket.emit("chatMessage",{msg: this.chatPrompt.value});
|
||||
this.commandPreprocessor.preprocess(this.chatPrompt.value);
|
||||
this.chatPrompt.value = "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue