summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-06-12 16:21:45 +0200
committerSimon Rettberg2019-06-12 16:21:45 +0200
commit72dac079fbac16ea9dee6de544bdc7ed24a5e208 (patch)
treed53f1c175511f3c9bbe1343cddc8c7f2450df65d /src/main.c
parentMake sure user promptly sees warning when using RPC (diff)
downloadidle-daemon-72dac079fbac16ea9dee6de544bdc7ed24a5e208.tar.gz
idle-daemon-72dac079fbac16ea9dee6de544bdc7ed24a5e208.tar.xz
idle-daemon-72dac079fbac16ea9dee6de544bdc7ed24a5e208.zip
Add RPC method "warn" to show messge to users
Only usable by root.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 81879b5..a823e03 100644
--- a/src/main.c
+++ b/src/main.c
@@ -558,3 +558,11 @@ void main_queueAction( enum Shutdown action, int delta )
}
}
+void main_warnAll( const char *message )
+{
+ for ( int idx = 0; idx < userCount; ++idx ) {
+ showWarning( &users[idx], "Warning", message );
+ }
+}
+
+