commito roba non committata

This commit is contained in:
encrypt 2017-02-16 16:37:22 +00:00
parent accfff8654
commit fa7dcaa753

View file

@ -26,7 +26,8 @@ class Radio
end
def on_help(m)
m.reply 'curl "http://soyuz.labr.xyz:8080/" | play -q - 2>/dev/null'
m.reply 'curl ""http://utvghefxggihh5ts.onion" | play -q - 2>/dev/null'
m.reply 'http://soyuz.labr.xyz:8000 - qua sta l\'interfaccia webbosa - poi ritorna'
m.reply 'comandi: '
m.reply ' info - ti dice la canzone che stai sentendo'
m.reply ' pialla - cancella la canzone che stai sentendo'
@ -43,9 +44,15 @@ class Radio
end
def on_info(m)
title = `mpc | head -n 1 | cut -d '#' -f 2 | base64 -d`
title.gsub("\n","")
m.reply CGI.unescapeHTML(title)
info = `mpc`.split("\n")
return if info.empty? || info.count <3
title = Base64.decode64(info[0].split('#').last).chomp
songs,time = "0"
if info[1] =~ /.* #[0-9]+\/([0-9]+)\s(.*)/
songs = $1
time = $2.strip
end
m.reply CGI.unescapeHTML(title)+" ["+time+"] "+songs+" songs in playlist"
end
def on_next(m)