Partial Branch Sync

This commit is contained in:
mark 2007-08-27 08:49:15 +00:00
parent 4718a4b911
commit 1ef98f10ec
32 changed files with 166 additions and 102 deletions

View file

@ -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 )

View file

@ -48,7 +48,7 @@ namespace Server.Misc
{
++count;
if ( count > MaxAddresses )
if ( count >= MaxAddresses )
return false;
}
}