mirror of https://github.com/icedream/ts3bot.git
Trim parameters so whitespace doesn't invalidate URLs.
parent
207bf24663
commit
0de22eb9e1
10
app.iced
10
app.iced
|
@ -149,14 +149,13 @@ ts3clientService.on "started", (ts3proc) =>
|
|||
return
|
||||
when "play"
|
||||
inputBB = paramline.trim()
|
||||
input = (removeBB paramline).trim()
|
||||
|
||||
# we gonna interpret play without a url as an attempt to unpause the current song
|
||||
if inputBB.length <= 0
|
||||
if input.length <= 0
|
||||
vlc.status.resume()
|
||||
return
|
||||
|
||||
input = removeBB inputBB
|
||||
|
||||
# only allow playback from file if it's a preconfigured alias
|
||||
if isValidUrl input
|
||||
log.debug "Got input URL:", input
|
||||
|
@ -209,14 +208,13 @@ ts3clientService.on "started", (ts3proc) =>
|
|||
|
||||
ts3query.sendtextmessage args.targetmode, invoker.id, "Playing next song in the playlist."
|
||||
when "enqueue", "add", "append"
|
||||
inputBB = paramline
|
||||
inputBB = paramline.trim()
|
||||
input = (removeBB paramline).trim()
|
||||
|
||||
if inputBB.length <= 0
|
||||
ts3query.sendtextmessage args.targetmode, invoker.id, "[B]#{name} <url>[/B] - Adds the specified URL to the current playlist"
|
||||
return
|
||||
|
||||
input = removeBB paramline
|
||||
|
||||
# only allow playback from file if it's a preconfigured alias
|
||||
if isValidUrl input
|
||||
log.debug "Got input URL:", input
|
||||
|
|
Loading…
Reference in New Issue