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
|
return
|
||||||
when "play"
|
when "play"
|
||||||
inputBB = paramline.trim()
|
inputBB = paramline.trim()
|
||||||
|
input = (removeBB paramline).trim()
|
||||||
|
|
||||||
# we gonna interpret play without a url as an attempt to unpause the current song
|
# 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()
|
vlc.status.resume()
|
||||||
return
|
return
|
||||||
|
|
||||||
input = removeBB inputBB
|
|
||||||
|
|
||||||
# only allow playback from file if it's a preconfigured alias
|
# only allow playback from file if it's a preconfigured alias
|
||||||
if isValidUrl input
|
if isValidUrl input
|
||||||
log.debug "Got input URL:", 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."
|
ts3query.sendtextmessage args.targetmode, invoker.id, "Playing next song in the playlist."
|
||||||
when "enqueue", "add", "append"
|
when "enqueue", "add", "append"
|
||||||
inputBB = paramline
|
inputBB = paramline.trim()
|
||||||
|
input = (removeBB paramline).trim()
|
||||||
|
|
||||||
if inputBB.length <= 0
|
if inputBB.length <= 0
|
||||||
ts3query.sendtextmessage args.targetmode, invoker.id, "[B]#{name} <url>[/B] - Adds the specified URL to the current playlist"
|
ts3query.sendtextmessage args.targetmode, invoker.id, "[B]#{name} <url>[/B] - Adds the specified URL to the current playlist"
|
||||||
return
|
return
|
||||||
|
|
||||||
input = removeBB paramline
|
|
||||||
|
|
||||||
# only allow playback from file if it's a preconfigured alias
|
# only allow playback from file if it's a preconfigured alias
|
||||||
if isValidUrl input
|
if isValidUrl input
|
||||||
log.debug "Got input URL:", input
|
log.debug "Got input URL:", input
|
||||||
|
|
Loading…
Reference in New Issue