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
|
|
@ -956,7 +956,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
try
|
||||
{
|
||||
Firewall.Add( ((IPEndPoint)state.Socket.RemoteEndPoint).Address );
|
||||
Firewall.Add( state.Address );
|
||||
AddResponse( "They have been firewalled." );
|
||||
}
|
||||
catch ( Exception ex )
|
||||
|
|
|
|||
|
|
@ -993,36 +993,6 @@ namespace Server.Commands
|
|||
e.Mobile.Target = new PickMoveTarget();
|
||||
}
|
||||
|
||||
private class FirewallTarget : Target
|
||||
{
|
||||
public FirewallTarget() : base( -1, false, TargetFlags.None )
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( targeted is Mobile )
|
||||
{
|
||||
Mobile targ = (Mobile)targeted;
|
||||
|
||||
NetState state = targ.NetState;
|
||||
|
||||
if ( state != null )
|
||||
{
|
||||
CommandLogging.WriteLine( from, "{0} {1} firewalling {2}", from.AccessLevel, CommandLogging.Format( from ), CommandLogging.Format( targeted ) );
|
||||
|
||||
try
|
||||
{
|
||||
Firewall.Add( ((IPEndPoint)state.Socket.RemoteEndPoint).Address );
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Usage( "Save" )]
|
||||
[Description( "Saves the world." )]
|
||||
private static void Save_OnCommand( CommandEventArgs e )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue