mirror of https://github.com/quasar/Quasar.git
Fixed #265
This commit is contained in:
parent
242ff96e7f
commit
fcf25b76a0
|
@ -13,7 +13,7 @@ public static partial class CommandHandler
|
||||||
{
|
{
|
||||||
public static void HandleInitialize(Client client, Initialize packet)
|
public static void HandleInitialize(Client client, Initialize packet)
|
||||||
{
|
{
|
||||||
if (client.EndPoint.Address.ToString() == "255.255.255.255")
|
if (client.EndPoint.Address.ToString() == "255.255.255.255" || packet.Id.Length != 64)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -32,8 +32,8 @@ public static void HandleInitialize(Client client, Initialize packet)
|
||||||
string userAtPc = string.Format("{0}@{1}", client.Value.Username, client.Value.PCName);
|
string userAtPc = string.Format("{0}@{1}", client.Value.Username, client.Value.PCName);
|
||||||
|
|
||||||
client.Value.DownloadDirectory = (!Helper.Helper.CheckPathForIllegalChars(userAtPc)) ?
|
client.Value.DownloadDirectory = (!Helper.Helper.CheckPathForIllegalChars(userAtPc)) ?
|
||||||
Path.Combine(Application.StartupPath, "Clients\\" + userAtPc + "\\") :
|
Path.Combine(Application.StartupPath, string.Format("Clients\\{0}_{1}\\", userAtPc, client.Value.Id.Substring(0, 7))) :
|
||||||
Path.Combine(Application.StartupPath, "Clients\\" + client.EndPoint.Address.ToString() + "\\");
|
Path.Combine(Application.StartupPath, string.Format("Clients\\{0}_{1}\\", client.EndPoint.Address, client.Value.Id.Substring(0, 7)));
|
||||||
|
|
||||||
if (!FrmMain.Instance.ListenServer.AllTimeConnectedClients.ContainsKey(client.Value.Id))
|
if (!FrmMain.Instance.ListenServer.AllTimeConnectedClients.ContainsKey(client.Value.Id))
|
||||||
FrmMain.Instance.ListenServer.AllTimeConnectedClients.Add(client.Value.Id, DateTime.Now);
|
FrmMain.Instance.ListenServer.AllTimeConnectedClients.Add(client.Value.Id, DateTime.Now);
|
||||||
|
|
Loading…
Reference in New Issue