Add gamemode_query_status and teach gamemoded '-s'

This allows the client to query the daemon about the status of gamemode.

	Returns the following:
		 0 if gamemode is inactive
		 1 if gamemode is active
		 2 if gamemode is active and this client is registered
		-1 if the query failed

	Passing -s to gamemoded will simply query and print the current status.

	Allows for more comprehensive testing when using 'gamemoded -r' as well as more reactionary program behaviour
This commit is contained in:
Marc Di Luzio
2018-04-25 14:39:05 +01:00
parent 966c207a33
commit 4f3bc2c9a2
8 changed files with 140 additions and 4 deletions

View File

@ -22,6 +22,9 @@ Log to syslog
.B \-r
Request gamemode and wait for any signal
.TP 8
.B \-s
Query the current status of gamemode
.TP 8
.B \-h
Print help text
.TP 8