Partial Branch Sync
This commit is contained in:
parent
4718a4b911
commit
1ef98f10ec
32 changed files with 166 additions and 102 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using Server;
|
||||
|
|
@ -66,6 +67,21 @@ namespace Server.Accounting
|
|||
|
||||
accessLog.Counts += 1;
|
||||
accessLog.RefreshAccessTime();
|
||||
|
||||
if ( accessLog.Counts >= 3 ) {
|
||||
try {
|
||||
using ( StreamWriter op = new StreamWriter( "throttle.log", true ) ) {
|
||||
op.WriteLine(
|
||||
"{0}\t{1}\t{2}",
|
||||
DateTime.Now,
|
||||
ns,
|
||||
accessLog.Counts
|
||||
);
|
||||
}
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static TimeSpan ComputeThrottle( int counts )
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Server.Misc
|
|||
{
|
||||
++count;
|
||||
|
||||
if ( count > MaxAddresses )
|
||||
if ( count >= MaxAddresses )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue