Dupe IP fix
This commit is contained in:
parent
679234a555
commit
c31d31f5c4
|
@ -4685,6 +4685,8 @@
|
||||||
an Amiga, for example). Mystic will now properly internally view LHA
|
an Amiga, for example). Mystic will now properly internally view LHA
|
||||||
extensions, as well as properly look for LHA in the archive configuration.
|
extensions, as well as properly look for LHA in the archive configuration.
|
||||||
|
|
||||||
! Fixed a bug when viewing an archive that is not supported with the
|
! Fixed a bug when viewing an archive that could cause the lightbar file
|
||||||
internal view that could cause the lightbar file list display to get
|
list display to not get redrawn after.
|
||||||
messed up.
|
|
||||||
|
! Duplicate IP check in MIS was not working properly. It is now.
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ Begin
|
||||||
If IoResult = 0 Then Begin
|
If IoResult = 0 Then Begin
|
||||||
While Not Eof(TF) Do Begin
|
While Not Eof(TF) Do Begin
|
||||||
ReadLn (TF, Str);
|
ReadLn (TF, Str);
|
||||||
|
|
||||||
If CheckIP (Client.PeerIP, Str) Then Begin
|
If CheckIP (Client.PeerIP, Str) Then Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
Break;
|
Break;
|
||||||
|
@ -152,19 +153,10 @@ Var
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
Begin
|
Begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
(*
|
|
||||||
For Count := 0 to ClientMax - 1 Do
|
|
||||||
If ClientList[Count] <> NIL Then // use Assigned?
|
|
||||||
If Client.PeerIP = TIOSocket(ClientList[Count]).PeerIP Then
|
|
||||||
Inc(Result);*)
|
|
||||||
|
|
||||||
For Count := 0 to ClientMax - 1 Do
|
For Count := 0 to ClientMax - 1 Do
|
||||||
If Assigned(ClientList[Count]) Then Begin
|
If Assigned(ClientList[Count]) Then Begin
|
||||||
// writeln('client ip:', client.peerip);
|
If Client.PeerIP = TServerClient(ClientList[Count]).Client.FPeerIP Then
|
||||||
// writeln('comp ip :', TIOSocket(clientlist[count]).fpeerip);
|
|
||||||
// waitms(3000);
|
|
||||||
|
|
||||||
If Client.PeerIP = TIOSocket(ClientList[Count]).PeerIP Then
|
|
||||||
Inc(Result);
|
Inc(Result);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -227,18 +219,21 @@ Begin
|
||||||
Inc (ClientRefused);
|
Inc (ClientRefused);
|
||||||
Status ('BUSY: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
Status ('BUSY: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
||||||
If Not NewClient.WriteFile(TextPath + 'busy.txt') Then NewClient.WriteLine('BUSY');
|
If Not NewClient.WriteFile(TextPath + 'busy.txt') Then NewClient.WriteLine('BUSY');
|
||||||
|
WaitMS(3000);
|
||||||
NewClient.Free;
|
NewClient.Free;
|
||||||
End Else
|
End Else
|
||||||
If IsBlockedIP(NewClient) Then Begin
|
If IsBlockedIP(NewClient) Then Begin
|
||||||
Inc (ClientBlocked);
|
Inc (ClientBlocked);
|
||||||
Status('BLOCK: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
Status('BLOCK: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
||||||
If Not NewClient.WriteFile(TextPath + 'blocked.txt') Then NewClient.WriteLine('BLOCKED');
|
If Not NewClient.WriteFile(TextPath + 'blocked.txt') Then NewClient.WriteLine('BLOCKED');
|
||||||
|
WaitMS(3000);
|
||||||
NewClient.Free;
|
NewClient.Free;
|
||||||
End Else
|
End Else
|
||||||
If (ClientMaxIPs > 0) and (DuplicateIPs(NewClient) >= ClientMaxIPs) Then Begin
|
If (ClientMaxIPs > 0) and (DuplicateIPs(NewClient) >= ClientMaxIPs) Then Begin
|
||||||
Inc (ClientRefused);
|
Inc (ClientRefused);
|
||||||
Status('MULTI: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
Status('MULTI: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')');
|
||||||
If Not NewClient.WriteFile(TextPath + 'dupeip.txt') Then NewClient.WriteLine('Only ' + strI2S(ClientMaxIPs) + ' connection(s) per user');
|
If Not NewClient.WriteFile(TextPath + 'dupeip.txt') Then NewClient.WriteLine('Only ' + strI2S(ClientMaxIPs) + ' connection(s) per user');
|
||||||
|
WaitMS(3000);
|
||||||
NewClient.Free;
|
NewClient.Free;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
Inc (ClientTotal);
|
Inc (ClientTotal);
|
||||||
|
|
Loading…
Reference in New Issue