diff options
| author | sD <stoned@derpymail.org> | 2020-04-28 22:02:13 +0200 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-04-28 22:02:13 +0200 |
| commit | 77784e5f09e0c05c5034693d6973a4bfaef0f072 (patch) | |
| tree | d475a0560fed676b09159d76df133ea85de1c64a /webAO/client.js | |
| parent | fe3b24de014a630a94ae9ae68756ca0f25a94b7e (diff) | |
handle servers not supporting modcall reason
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webAO/client.js b/webAO/client.js index 58a8c61..0b06670 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -317,7 +317,11 @@ class Client extends EventEmitter { * @param {string} message to mod */ sendZZ(msg) { - this.sendServer(`ZZ#${msg}#%`); + if (extrafeatures.includes("modcall_reason")) { + this.sendServer(`ZZ#${msg}#%`); + } else { + this.sendServer(`ZZ#%`); + } } /** @@ -2590,7 +2594,10 @@ window.randomCharacterOOC = randomCharacterOOC; * Call mod. */ export function callMod() { - let modcall = prompt("Please enter the reason for the modcall", ""); + let modcall; + if (extrafeatures.includes("modcall_reason")) { + modcall = prompt("Please enter the reason for the modcall", ""); + } if (modcall == null || modcall === "") { // cancel } else { |
