Improve events
Add known clients (cache) for leaving clients Add message to returned json object
This commit is contained in:
		
							parent
							
								
									f860fe3689
								
							
						
					
					
						commit
						ae411b6dcc
					
				
					 7 changed files with 117 additions and 24 deletions
				
			
		
							
								
								
									
										10
									
								
								ts-control
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								ts-control
									
										
									
									
									
								
							|  | @ -9,7 +9,7 @@ not away | |||
| back | ||||
| message | ||||
| message-user | ||||
| events-move" | ||||
| events" | ||||
| 
 | ||||
| _ts_control_get_entity() { | ||||
| 	entity=$(_ts_control_single_or_dmenu "$(teamspeak-query-lib "$1s")" "$2") | ||||
|  | @ -98,8 +98,8 @@ case $action in | |||
| 		message=$(_ts_control_get_message "$3") | ||||
| 		teamspeak-query-lib message --strict-client --client "$user" "$message" | ||||
| 		;; | ||||
| 	"events-move") | ||||
| 		teamspeak-query-lib events NotifyClientMoved NotifyClientEnterView \ | ||||
| 			| jq -r --unbuffered '.client.client_nickname + " joined " + .channel.channel_name // "the server"' \ | ||||
| 			| tee >(xargs -I{} notify-send "TS3 movement" "{}") | ||||
| 	"events") | ||||
| 		teamspeak-query-lib events NotifyClientMoved NotifyClientEnterView NotifyClientLeftView NotifyTextMessage NotifyClientPoke \ | ||||
| 			| jq -r --unbuffered '.message' \ | ||||
| 			| tee >(xargs -I{} notify-send "TS3 Event" "{}") | ||||
| esac | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue