aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.3k stars 176 forks source link

[Feature Request] #1091

Closed LuanTeles closed 3 months ago

LuanTeles commented 3 months ago

Aldo, this thread caught my attention: Getting the current user. It's exactly what I've been needing for some time. Can a wait command for the logged user and an if-logged condition be added?

I'm currently using this to execute commands only when the user is logged into the system:

:xmb_check if exist /dev_hdd0/home/$USERID$/localusername wait 5 goto settings else wait 5 /pad.ps3?accept /pad.ps3?accept wait 5 goto settings end if

It works, but most of the time the pad command is executed when the user is logged in. I use this because some commands, such as installing a theme, will make the system hang if no user is logged in.

aldostools commented 3 months ago

Try this webftp_server_test_waituser&_iflogout&_if_login.zip

Syntax of new commands: wait user if login if logout

aldostools commented 3 months ago

In this new build I have added support for multiple script commands in a single line. Use the semicolon ; as command separator. webftp_server_test2.zip

Example:

if login; popup User is logged in; end
if logout; popup User is logged out; beep5; end
LuanTeles commented 3 months ago

Thank you Aldo, it's perfectly working, both commands and the multiple commands in a single line too