BanchoLobby: don't specify timeout if set to 0

parent 66bc295c
Pipeline #3042 passed with stage
in 1 minute and 22 seconds
......@@ -701,7 +701,7 @@ class BanchoLobby extends EventEmitter {
*/
startMatch(timeout = null) {
return new Promise((resolve, reject) => {
this.channel.sendMessage("!mp start "+(timeout != null ? timeout : "")+" "+this.randomString())
this.channel.sendMessage("!mp start"+((timeout != null && Number(timeout) != 0) ? " " + Number(timeout) : "")+" "+this.randomString())
.then(() => {
if(timeout > 0)
resolve();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment