package;
import bluntirc.*;
import java.net.*;


class Plugin{
	public Plugin(ScriptManager manager){
		App.Log("Hello,world");
		CTN_Conn node = App.getSelectedConn();
		if(node==null){
			App.Log("no conn");
			return;
		}
		Socket socket= node.conn.getSocket();
		if(socket==null){
			App.Log("no socket");
			return;
		}
		InetAddress addr =socket.getLocalAddress();
		if(addr==null){
			App.Log("no LocalSocketAddress");
		}else{
			App.Log("address "+addr.toString());
		}


		addr =InetAddress.getLocalHost();
		if(addr==null){
			App.Log("no InetAddress.getLocalHost");
		}else{
			App.Log("InetAddress.getLocalHost() "+addr.toString());
		}


		InetSocketAddress isa = (InetSocketAddress)socket.getLocalSocketAddress();
		if(isa==null){
			App.Log("no LocalSocketAddress");
		}else{
			addr = isa.getAddress();
			App.Log("local "+addr.toString());
		}

		isa = (InetSocketAddress)socket.getRemoteSocketAddress();
		if(isa==null){
			App.Log("no RemoteSocketAddress");
		}else{
			App.Log("remote "+isa.toString());
		}

	}
	public void unload(){
		App.Log("So long,world");
	}
}
