Skip to content

Commit

Permalink
tweak(server): add playername as name pattern placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackFlash5 committed Mar 17, 2022
1 parent 3fbe6db commit ec89fa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ShortRangeDistance | `float` | Maximum range of SR radio mode
LongRangeDistace | `float` | Maximum range of LR radio mode
MegaphoneRange | `float` | Range of the megaphone (only available while driving a police car)
VariablePhoneDistortion | `bool` | Enables/disables variable phone distortion based on position of players
NamePattern | `string` | Naming schema of TeamSpeak clients, `{serverid}` will be replaced by the FiveM server ID of the client and `{guid}` will be replaced by a generated GUID
NamePattern | `string` | Naming schema of TeamSpeak clients, `{serverid}` will be replaced by the FiveM server ID of the client, `{playername}` by the name of the client and `{guid}` by a generated GUID
RequestTalkStates | `bool` | Enables/disables [TalkState's](https://github.com/v10networkscom/saltychat-docs/blob/master/commands.md#11--talkstate)
RequestRadioTrafficStates | `bool` | Enables/disables [RadioTrafficState's](https://github.com/v10networkscom/saltychat-docs/blob/master/commands.md#33--radiotrafficstate)

Expand Down
1 change: 1 addition & 0 deletions saltychat/SaltyServer/VoiceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ public string GetTeamSpeakName(Player player)
do
{
name = Regex.Replace(name, @"(\{serverid\})", player.Handle);
name = Regex.Replace(name, @"(\{playername\})", player.Name);
name = Regex.Replace(name, @"(\{guid\})", Guid.NewGuid().ToString().Replace("-", ""));

if (name.Length > 30)
Expand Down

0 comments on commit ec89fa3

Please sign in to comment.