BACKUP TEAMSPEAK3 FOLDER AND DATABASE BEFORE USING !!!!
First working version, tested only on 3.0.13.6 Teamspeak Server.
ts3chavatar.sh bash script allows a linux ts3 server owner to change an user's avatar by inputing: username, picture and path to teamspeak directory as arguments. It does that by overwriting the old avatar file with the new one and editing the database to set new avatar hash for user.
Prerequisites: sqlite3
Install "sqlite3" with your packet manager:
apt-get install sqlite3
yum install sqlite3
Parameters:
- Nickname of user
- Full path of picture
- Full path of ts3 directory
Usage:
Run as teamspeak user or root.
./ts3chavatar.sh {NICKNAME} {FULL_PATH_OF_PIC} {FULL_PATH_OF_TS3}
Example:
./ts3chavatar.sh JohnDoe /home/teamspeak/upload/JohnSelfie12.jpg /home/teamspeak/
That's it.
Notes :
To Do: Get ts3 path automatically, validation, multiple servers in one db ??
sqlite3 Querries for testing:
get UIDSELECT client_unique_id from clients where client_nickname='tester1';
get ID
SELECT client_id from clients where client_nickname='tester1';
set avatar md5hash
UPDATE client_properties SET value='b3b3b8e6d973385716fb320b77331f78' WHERE ident='client_flag_avatar' AND id='3689';
get md5 to input in table
md5sum {filename}