Use player ID as an alternative to names
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Use player ID as an alternative to names
It would be really useful if there could be a way to reference players by their ID to perform various commands on. Like "rename_player 3 noob" or "kill 2" or "spawn_zone zombieOwner 2 3 ...". This currently only works for banning and kicking.
Making this work would allow for maps with zombie zones in the xml (cannot spawn zombies without a player target), preforming admin commands on people who have all unicode characters, and many more possibilities (yes, many possibilities ).
Seeing how this has already been done for banning and kicking, it shouldn't be that hard to implement to the other functions?
Making this work would allow for maps with zombie zones in the xml (cannot spawn zombies without a player target), preforming admin commands on people who have all unicode characters, and many more possibilities (yes, many possibilities ).
Seeing how this has already been done for banning and kicking, it shouldn't be that hard to implement to the other functions?
Re: Use player ID as an alternative to names
Commands like rename_player, etc. actually function the way you describe, but sty+ct disabled this behavior. Here's a comment about it:
Also, if a player has a name with only special characters you can kick them by using a transcribed version of their name. Example: öî → KICK oi. Remember that for commands that take a player name as an argument, you do not need to supply the full name—only a unique substring is required.
Code: Select all
Removed by ed so players are not selected by id number, just names, So players with a number for a name do not confuse things
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
That's quite interesting, thanks for the info. So a non sty+ct server would allow any command with player arguments to be substituted with player ID's?dlh wrote:Commands like rename_player, etc. actually function the way you describe, but sty+ct disabled this behavior. Here's a comment about it:Code: Select all
Removed by ed so players are not selected by id number, just names, So players with a number for a name do not confuse things
Is there a command that turns the sty+ct override off?
Also, on a side note, if you /op a person with unicode characters to a useless access level, you can see how the name is transcribed.
- kyle
- Reverse Outside Corner Grinder
- Posts: 1876
- Joined: Thu Jun 08, 2006 3:33 pm
- Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
- Contact:
Re: Use player ID as an alternative to names
yes this is something we did in sty+ct because when our scripts interacted with the server, if a player was named 1 it would do the action on the person with an ID of 1, here is what was done.
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
I see...kyle wrote:yes this is something we did in sty+ct because when our scripts interacted with the server, if a player was named 1 it would do the action on the person with an ID of 1, here is what was done.
As a feature request, could there be a way to discern between the two? Perhaps when referencing a person by ID, the parameter could be "rename_player ID:1 noob". If a person were actually named "ID:1", performing a command on them would be referencing them by a substring like "rename_player D:1".
Or perhaps it might be easier to have a command to toggle ID referencing on and off?
Re: Use player ID as an alternative to names
That's a tough interface design problem. What do you do about players named ID:1?
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
Z-Man wrote:That's a tough interface design problem. What do you do about players named ID:1?
dukevin wrote:If a person were actually named "ID:1", performing a command on them would be referencing them by a substring like "rename_player ID".
-
- Adjust Outside Corner Grinder
- Posts: 2003
- Joined: Tue Nov 07, 2006 6:02 pm
- Location: paris
- Contact:
Re: Use player ID as an alternative to names
# at the beginning could work as an escape sequence and could be extended in the future. A double ## at the beginning of the mention translates to one # in the player name. ; terminates the sequence and & would split members in the matching sequence. No need to escape anything else.
(I forgot if # gets to be an evil character or not in the last line)
Code: Select all
Player name Mention by name Mention by ID
Player 1 player_1 #id=1;
#id=1337; ##id=1337; #id=2;
First #1 first_#1 or first_1 #id=3;
Re: Use player ID as an alternative to names
dukevin: and if members of the ID clan are around?
epsy: I'm not too hot about another set of escape rules, but that would work. I'd prefer the shorthand #1, #2 instead of #id=1; #id=2; (of course, # followed by non-digits could still be reserved for extensions) and I don't understand what & would do. Also, how does first_1 match first_#1?
epsy: I'm not too hot about another set of escape rules, but that would work. I'd prefer the shorthand #1, #2 instead of #id=1; #id=2; (of course, # followed by non-digits could still be reserved for extensions) and I don't understand what & would do. Also, how does first_1 match first_#1?
Re: Use player ID as an alternative to names
Wouldn't quotes (ex: suspend "ID:1") work for player names work too?
<-- Proud co-leader of Rogue Tronners
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
Use a different substring. Instead of "ID" use "D:1" for kicking someone named ID:1. I hardily think people will be named such though.Z-Man wrote:dukevin: and if members of the ID clan are around?
Re: Use player ID as an alternative to names
Tobe: what about names with quotes, then?
dukevin: no, you don't want to kick THEM. You want to kick the player named ID:1. And, of course, not D:1, who is also around.
dukevin: no, you don't want to kick THEM. You want to kick the player named ID:1. And, of course, not D:1, who is also around.
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
no, that's not what I meant.Z-Man wrote: dukevin: no, you don't want to kick THEM. You want to kick the player named ID:1. And, of course, not D:1, who is also around.
for kicking:
- Their name | Their ID | What to type
2 | ID:1 | kick 2 or kick ID:1
ID:1 | ID:2 | kick ID or another substring of their name like D:1 or :1
->}ID | ID:1 | kick ID or another substring
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Re: Use player ID as an alternative to names
What about simply a second set of commands for dealing with IDs? An automatic extension of some sort. If kick_player goes by name, kick_player_id automatically resolves the name from id and goes to kick_player.
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Use player ID as an alternative to names
do this for every command that takes in a player name as an argument? And how would this work for zombie zones set to go after player ID:1?Tank Program wrote:What about simply a second set of commands for dealing with IDs? An automatic extension of some sort. If kick_player goes by name, kick_player_id automatically resolves the name from id and goes to kick_player.
If all this is too complicated, could there be an option to turn the ct override off?