mirror of
https://github.com/danog/id3bot.git
synced 2024-11-30 04:19:02 +01:00
Merge pull request #10 from iicc1/patch-2
Updated nested tmux and fixed username in groups
This commit is contained in:
commit
decd11ee0a
@ -151,7 +151,7 @@ startproc() {
|
||||
rm -r $copname
|
||||
mkfifo $copname
|
||||
tmux kill-session -t $copname
|
||||
tmux new-session -d -s $copname "./question &>$copname"
|
||||
TMUX= tmux new-session -d -s $copname "./question &>$copname"
|
||||
while tmux ls | grep -q $copname;do
|
||||
read -t 10 line
|
||||
[ "$line" != "" ] && send_message "${USER[ID]}" "$line"
|
||||
@ -169,7 +169,7 @@ process_client() {
|
||||
# User
|
||||
USER[FIRST_NAME]=$(echo "$res" | egrep '\["result",0,"message","chat","first_name"\]' | cut -f 2 | cut -d '"' -f 2)
|
||||
USER[LAST_NAME]=$(echo "$res" | egrep '\["result",0,"message","chat","last_name"\]' | cut -f 2 | cut -d '"' -f 2)
|
||||
USER[USERNAME]=$(echo "$res" | egrep '\["result",0,"message","chat","username"\]' | cut -f 2 | cut -d '"' -f 2)
|
||||
USER[USERNAME]=$(echo "$res" | sed 's/^.*\(username.*\)/\1/g' | cut -d '"' -f3)
|
||||
|
||||
# Audio
|
||||
URLS[AUDIO]=$(get_file $(echo "$res" | egrep '\["result",0,"message","audio","file_id"\]' | cut -f 2 | cut -d '"' -f 2))
|
||||
|
Loading…
Reference in New Issue
Block a user