-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodPlayer.cs
More file actions
executable file
·46 lines (41 loc) · 1.27 KB
/
Copy pathCodPlayer.cs
File metadata and controls
executable file
·46 lines (41 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace BlopsAutoKicker
{
/// <summary>
/// Represents a CodPlayer that connected to the server
/// </summary>
internal class CodPlayer
{
internal string Name { get; set; }
internal string ClanTag { get; set; }
internal string FullName { get; set; }
internal HashSet<Warning> Warnings { get; set; }
internal bool Greeted { get; set; }
internal string Id { get; set; }
internal Guid Guid { get; set; }
internal bool IsXD { get; set; }
private static Regex NameRegex = new Regex(@"^\[(.*?)\](.*?)$",RegexOptions.Compiled);
internal CodPlayer(string fullName, string id)
{
Warnings = new HashSet<Warning>();
Greeted = false;
Id = id;
IsXD = false;
var m = NameRegex.Match(fullName);
FullName = fullName;
if (m.Success)
{
ClanTag = m.Groups[1].Value;
Name = m.Groups[2].Value;
}
else
{
Name = fullName;
}
}
}
}