A workaround for toxic client buggyness

This commit is contained in:
Bob Mottram 2015-08-26 21:17:26 +01:00
parent d89b387635
commit f37f57e2fe
1 changed files with 7 additions and 3 deletions

View File

@ -147,15 +147,17 @@ if [ ! -f $MUMBLE_PATH ]; then
fi
fi
lstox -f dht > /tmp/dht
sudo cp /tmp/dht $DHTNODES
sudo cp /tmp/dht $DHTNODES
PEER_TOX_ID=$(lstox | grep $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
if [ ${#PEER_TOX_ID} -gt 30 ]; then
echo "/nick $USER
/add $PEER_TOX_ID
/exit
" | $TOXIC_PATH -d
$TOXIC_PATH -d
exit 0
else
echo $PEER_TOX_ID
echo $PEER_TOX_ID
echo "Tox ID for $AVAHI_DOMAIN was not found"
exit 6
fi
@ -208,12 +210,14 @@ else
fi
fi
lstox -f dht > /tmp/dht
sudo cp /tmp/dht $DHTNODES
sudo cp /tmp/dht $DHTNODES
PEER_TOX_ID=$(lstox | grep $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
if [ ${#PEER_TOX_ID} -gt 30 ]; then
echo "/nick $USER
/add $PEER_TOX_ID
/exit
" | $TOXIC_PATH -d
$TOXIC_PATH -d
else
echo "Tox ID for $AVAHI_DOMAIN was not found"
exit 6