updated a few places to use NetState.Address rather than Socket.RemoteEndPoint.Address
added Utility.Intern(IPAddress) and implemented where appropriate
This commit is contained in:
parent
442b48d406
commit
e15ed963d8
9 changed files with 29 additions and 43 deletions
|
|
@ -740,7 +740,7 @@ namespace Server.Accounting
|
|||
|
||||
if( IPAddress.TryParse( Utility.GetText( ip, null ), out address ) )
|
||||
{
|
||||
list[count] = address;
|
||||
list[count] = Utility.Intern( address );
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
|
@ -881,10 +881,7 @@ namespace Server.Accounting
|
|||
return false;
|
||||
}
|
||||
|
||||
IPAddress ipAddress;
|
||||
|
||||
try { ipAddress = ( (IPEndPoint) ns.Socket.RemoteEndPoint ).Address; }
|
||||
catch { return false; }
|
||||
IPAddress ipAddress = ns.Address;
|
||||
|
||||
bool accessAllowed = ( m_IPRestrictions.Length == 0 || IPLimiter.IsExempt( ipAddress ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace Server.Misc
|
|||
|
||||
try
|
||||
{
|
||||
IPAddress ipAddress = ((IPEndPoint)ns.Socket.RemoteEndPoint).Address;
|
||||
IPAddress ipAddress = ns.Address;
|
||||
|
||||
if ( Utility.IPMatchClassC( accessList[0], ipAddress ) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue