From adeccf6d57da68d61f98190d4a102f7a68486198 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 29 Oct 2015 02:23:53 +0100 Subject: [PATCH] Allow "vol" to display current volume if no arguments were given. --- app.iced | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app.iced b/app.iced index a05428b..b08eea6 100644 --- a/app.iced +++ b/app.iced @@ -290,7 +290,14 @@ ts3clientService.on "started", (ts3proc) => when "stop" vlc.stop() when "vol" - vol = parseInt paramline + inputBB = paramline.trim() + input = (removeBB paramline).trim() + + if inputBB.length <= 0 + ts3query.sendtextmessage args.targetmode, invoker.id, "Volume is currently set to #{vlc.audio.volume}%." + return + + vol = parseInt input if paramline.trim().length <= 0 or vol == NaN or vol > 200 or vol < 0 ts3query.sendtextmessage args.targetmode, invoker.id, "[B]vol [/B] - takes a number between 0 (0%) and 200 (200%) to set the volume. 100% is 100. Defaults to 50 (50%) on startup."