term.getUserName()
This would return name of the user that is currently using console. If nobody is using it, it will return nil. This will change to nil as soon as player presses ESC key (leaves computer GUI).
Would be useful. For example if you want to restrict certain functions of your program to specific users.
In SMP, it could even return list of all users that are currently using this computer.
[1.5]Ability to retreive name of the player currently using the computer
Started by matejdro, Jul 28 2012 03:03 PM
12 replies to this topic
#1
Posted 28 July 2012 - 03:03 PM
#2
Posted 28 July 2012 - 03:31 PM
Please not, I hate magic functions <.<
#3
Posted 28 July 2012 - 03:34 PM
What is magic here?
#5
Posted 28 July 2012 - 03:42 PM
Yeah, you might be right. Scrap that then.
#6
Posted 28 July 2012 - 03:59 PM
Something like a retina scanner or fingerprint reader would be useful
/>
#7
Posted 28 July 2012 - 05:55 PM
Isn't there a player sensor for CCSensors already? That could solve this problem.
#8
Posted 28 July 2012 - 11:31 PM
Remind me not to install CCSensors...
#9
Posted 18 August 2012 - 04:10 AM
The computer currently has no way of even recognizing who is using the computer anyway.
You see, when you interact with the computer, the screen itself is running on the server, you can just view it.
This is so that multiple people can use the same computer, at the same time. When you press a key, it gets sent to the computer, but it gets sent "anonymously".
Now if this was even possible to implement, by some magical whatever, how would it act if two people were using the same computer? Also, a computer cannot detect if you are using it anyway..
You see, when you interact with the computer, the screen itself is running on the server, you can just view it.
This is so that multiple people can use the same computer, at the same time. When you press a key, it gets sent to the computer, but it gets sent "anonymously".
Now if this was even possible to implement, by some magical whatever, how would it act if two people were using the same computer? Also, a computer cannot detect if you are using it anyway..
#10
Posted 18 August 2012 - 12:59 PM
A simple login program will do the trick about who is logged to the system like in most *nix systems. Of course, when a co-worker is looking at my monitor the PC doens't know it, but it knows about me who logged in
/>
We could ask for a multi-user OS but that would be overkill I think.
We could ask for a multi-user OS but that would be overkill I think.
#11
Posted 18 August 2012 - 01:50 PM
Well but random people can't type on my keyboard while i do @ *nix systems
/>
#12
Posted 18 August 2012 - 02:42 PM
Maybe not getting the player name, but locking the computer out to everyone else but the first user to click on it. The rest just get to watch the screen, and cannot mess up the input. Multiple users typing at the same time make for an annoying problem.
#13
Posted 18 August 2012 - 03:50 PM
Pinkishu, on 18 August 2012 - 01:50 PM, said:
Well but random people can't type on my keyboard while i do @ *nix systems
/>
Touché
craniumkid22, on 18 August 2012 - 02:42 PM, said:
Maybe not getting the player name, but locking the computer out to everyone else but the first user to click on it. The rest just get to watch the screen, and cannot mess up the input. Multiple users typing at the same time make for an annoying problem.
Thats a nice idea. Not sure the time spends would be worth it but if it doesn't take too much time it would be a nice option to have
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











