예제 #1
0
파일: useful.cs 프로젝트: zadark/par
    public useful(ProxyFrame frame)
    {
        this.frame = frame;
        this.proxy = frame.proxy;

        /*this.proxy.AddDelegate(PacketType.AgentMovementComplete, Direction.Incoming, delegate(Packet packet, IPEndPoint sim)
         * {
         *  RegionHandle = ((AgentMovementCompletePacket)packet).Data.RegionHandle;
         *  return packet;
         * });
         * this.proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, delegate(Packet packet, IPEndPoint sim)
         * {
         *  CameraCenter = ((AgentUpdatePacket)packet).AgentData.CameraCenter;
         *  return packet;
         * });
         */

        //this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler));
        //this.proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, new PacketDelegate(OutAgentUpdateHandler));
        //this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Incoming, new PacketDelegate(InImprovedInstantMessageHandler));
        //this.proxy.AddDelegate(PacketType.ViewerEffect, Direction.Incoming, new PacketDelegate(InViewerEffectHandler));
        this.proxy.AddDelegate(PacketType.AlertMessage, Direction.Incoming, new PacketDelegate(InAlertMessageHandler));
        //this.proxy.AddDelegate(PacketType.AvatarPropertiesRequest, Direction.Outgoing, new PacketDelegate(OutAvatarPropertiesRequestHandler));
        this.proxy.AddDelegate(PacketType.GroupProfileReply, Direction.Incoming, new PacketDelegate(GroupProp));
        //this.proxy.AddDelegate(PacketType.AvatarSitResponse, Direction.Incoming, new PacketDelegate(InAvatarSitResponseHandler));
        //this.proxy.AddDelegate(PacketType.TerminateFriendship, Direction.Incoming, new PacketDelegate(InTerminateFriendshipHandler));
        //this.proxy.AddDelegate(PacketType.ObjectUpdate, Direction.Incoming, new PacketDelegate(InObjectUpdateHandler));
    }
예제 #2
0
 public ProfileFunPlugin(PubComb plug)
 {
     plugin     = plug;
     form       = new SimpleProfForm1(this);
     this.frame = plug.frame;
     shared     = plugin.SharedInfo;
     this.proxy = plug.proxy;
     proxy.AddDelegate(PacketType.AvatarPropertiesReply, Direction.Incoming, new PacketDelegate(inAvatar));
     RefreshDownloadsTimer.Elapsed += new System.Timers.ElapsedEventHandler(RefreshDownloadsTimer_Elapsed);
     RefreshDownloadsTimer.Start();
     proxy.AddDelegate(PacketType.AgentMovementComplete, Direction.Incoming, delegate(Packet packet, IPEndPoint sim)
     {
         shared.RegionHandle = ((AgentMovementCompletePacket)packet).Data.RegionHandle;
         return(packet);
     });
     proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, delegate(Packet packet, IPEndPoint sim)
     {
         AgentUpdatePacket.AgentDataBlock p = ((AgentUpdatePacket)packet).AgentData;
         shared.CameraPosition = p.CameraCenter;
         shared.CameraAtAxis   = p.CameraAtAxis;
         shared.CameraLeftAxis = p.CameraLeftAxis;
         shared.CameraUpAxis   = p.CameraUpAxis;
         shared.Far            = p.Far;
         shared.ip             = sim.Address;
         shared.port           = sim.Port;
         return(packet);
     });
 }
예제 #3
0
        // Main Program
        public MainForm()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            InitializeComponent();

            this.frame = new ProxyFrame(Environment.GetCommandLineArgs());
            this.proxy = this.frame.proxy;


            // build the table of login response delegates
            InitializeLoginDelegates();

            // build the table of packet delegates
            InitializePacketDelegates();

            // build the table of /command delegates
            InitializeCommandDelegates();

            // sets the window title
            this.Text = _progname + " v" + _version;
            // sets the initial console text (welcome text)
            SayToUser(_progname + " v" + _version + " initialized.");
            SayToUser("Built against LibOpenMetaverse v" + _libopenmv + ".");
            SayToUser("Connecting to " + this.proxy.proxyConfig.remoteLoginUri.ToString());
            SayToUser("");

            StatusSetMsg("Not logged in.");

            // Starts the proxy
            this.proxy.Start();
        }
예제 #4
0
        public AwesomeSauce(PubComb p)
        {
            plugin        = p;
            currentRegion = UUID.Zero.GetULong();
            form          = new AweseomeSauceForm1(this);
            this.frame    = p.frame;
            this.proxy    = frame.proxy;
            //this.proxy.AddDelegate(PacketType.ScriptDialogReply, Direction.Outgoing, new PacketDelegate(OutDialogFromViewer));
            //this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler));
            //this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Outgoing, new PacketDelegate(SendingIM));
            this.proxy.AddDelegate(PacketType.AssetUploadRequest, Direction.Outgoing, new PacketDelegate(TryToSendAsset));
            this.proxy.AddDelegate(PacketType.ConfirmXferPacket, Direction.Incoming, new PacketDelegate(InConfirmXferPacketHandler));
            this.proxy.AddDelegate(PacketType.RequestXfer, Direction.Incoming, new PacketDelegate(ServerRequestsMyDataToStart));
            this.proxy.AddDelegate(PacketType.SendXferPacket, Direction.Outgoing, new PacketDelegate(ClientSentThisScript));
            this.proxy.AddDelegate(PacketType.TransferPacket, Direction.Incoming, new PacketDelegate(LoadingUpNewScript));
            this.proxy.AddDelegate(PacketType.TransferInfo, Direction.Incoming, new PacketDelegate(SimWantsToSendUs));
            //this.proxy.AddDelegate(PacketType.ReplyTaskInventory, Direction.Incoming, new PacketDelegate(ReplyTask));
            //this.proxy.AddDelegate(PacketType.TransferRequest, Direction.Outgoing, new PacketDelegate(TrasferReq));
            //this.proxy.AddCapsDelegate("UpdateScriptTask", new CapsDelegate(UploadStart));
            //this.proxy.AddCapsDelegate("UpdateScriptAgent", new CapsDelegate(UploadStart));

            //if (!Directory.Exists("(You can Delete me) Expired Scripts Cache"))
            //Directory.CreateDirectory("(You can Delete me) Expired Scripts Cache");

            if (!Directory.Exists("Scripts Cache"))
            {
                Directory.CreateDirectory("Scripts Cache");
            }

            // File.Move("./" + f, "./Old Particle Scripts/" + DateTime.Now.Date.Month.ToString() + "-" + DateTime.Now.Day.ToString() + "-" + DateTime.Now.Year.ToString() +
            //     " - " + DateTime.Now.TimeOfDay.TotalSeconds.ToString() + "@" + f.Substring(17));
        }
예제 #5
0
 public ProTextPlug(PubComb p)
 {
     plugin     = p;
     this.frame = p.frame;
     this.proxy = frame.proxy;
     form       = new ProTextionForm1(this);
     this.proxy.AddDelegate(PacketType.ImageData, Direction.Incoming, new PacketDelegate(ImageDataHandler));
 }
예제 #6
0
파일: InventoryFun.cs 프로젝트: zadark/par
 public InvFunPlugin(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new InvFunForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
 }
예제 #7
0
    public static void Main(string[] args)
    {
        ProxyFrame  p       = new ProxyFrame(args);
        ProxyPlugin analyst = new Analyst(p);

        analyst.Init();
        p.proxy.Start();
    }
예제 #8
0
 public FileProtectPlugin(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new FileProtectForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.proxy.AddDelegate(PacketType.RequestXfer, Direction.Incoming, new PacketDelegate(disbale));
 }
예제 #9
0
 public SitAnywherePlugin(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new SitAnywhereForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.frame.AddCommand("/sit", new ProxyFrame.CommandDelegate(this.CmdSit));
 }
예제 #10
0
 public ViewerEffectLogPlugin(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new VELogForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.proxy.AddDelegate(PacketType.ViewerEffect, Direction.Incoming, new PacketDelegate(ve));
 }
예제 #11
0
 public SitBlockPlugin(PubComb plug)
 {
     plugin     = plug;
     form       = new SitBlockForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.brand = "SitBlock";
     proxy.AddDelegate(PacketType.AgentRequestSit, Direction.Outgoing, new PacketDelegate(sitp));
 }
예제 #12
0
        public ProxyManager(string port, string listenIP, string loginUri)
        {
            openmvAssembly = Assembly.Load("OpenMetaverse");
            if (openmvAssembly == null)
            {
                throw new Exception("Assembly load exception");
            }

            _Port = string.Format("--proxy-login-port={0}", port);

            IPAddress remoteIP; // not used

            if (IPAddress.TryParse(listenIP, out remoteIP))
            {
                _ListenIP = String.Format("--proxy-client-facing-address={0}", listenIP);
            }
            else
            {
                _ListenIP = "--proxy-client-facing-address=127.0.0.1";
            }

            if (String.IsNullOrEmpty(loginUri))
            {
                _LoginURI = "--proxy-remote-login-uri=https://login.agni.lindenlab.com/cgi-bin/login.cgi";
            }
            else
            {
                _LoginURI = "--proxy-remote-login-uri=" + loginUri;
            }


            string[] args = { _Port, _ListenIP, _LoginURI };

            /*
             *  help
             *  proxy-help
             *  proxy-login-port
             *  proxy-client-facing-address
             *  proxy-remote-facing-address
             *  proxy-remote-login-uri
             *  verbose
             *  quiet
             */

            ProxyConfig pc = new ProxyConfig("WinGridProxy", "Jim Radford", args, false);

            Proxy = new ProxyFrame(args, pc);

            Proxy.proxy.AddLoginRequestDelegate(new XmlRpcRequestDelegate(LoginRequest));
            Proxy.proxy.AddLoginResponseDelegate(new XmlRpcResponseDelegate(LoginResponse));

            Proxy.proxy.AddCapsDelegate("EventQueueGet", new CapsDelegate(EventQueueGetHandler));

            // this is so we are informed of any new capabilities that are added to the KnownCaps dictionary
            Proxy.proxy.KnownCaps.AddDelegate(OpenMetaverse.DictionaryEventAction.Add, new OpenMetaverse.DictionaryChangeCallback(KnownCapsAddedHandler));
        }
예제 #13
0
파일: High.cs 프로젝트: zadark/par
 public HighPlugin(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new HighForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.frame.AddCommand("/high", new ProxyFrame.CommandDelegate(this.CmdHigh));
     this.frame.AddCommand("/tp", new ProxyFrame.CommandDelegate(this.CmdTp));
     this.proxy.AddDelegate(PacketType.ObjectSelect, Direction.Outgoing, new PacketDelegate(this.ToHigh));
     this.proxy.AddDelegate(PacketType.ObjectDeselect, Direction.Outgoing, new PacketDelegate(this.ToHigh));
 }
예제 #14
0
 public RadarChatPlugin(PubComb plug)
 {
     start      = System.DateTime.Now;
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new RadarChatForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.proxy.AddDelegate(PacketType.UUIDNameReply, Direction.Incoming, new PacketDelegate(GotName));
     this.proxy.AddDelegate(PacketType.CoarseLocationUpdate, Direction.Incoming, new PacketDelegate(LocationIN));
     this.proxy.AddDelegate(PacketType.SoundTrigger, Direction.Incoming, new PacketDelegate(inSound));
 }
예제 #15
0
파일: CliInt.cs 프로젝트: zadark/par
 public CliIntPlugin(PubComb plug)
 {
     plugin = plug;
     form   = new CliIntForm1(this);
     //plug.tabform.addATab(form, "CliInt");
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     proxy.AddDelegate(PacketType.AlertMessage, Direction.Incoming, new PacketDelegate(this.InAlertMessageHandler));
     proxy.AddDelegate(PacketType.ObjectUpdate, Direction.Incoming, new PacketDelegate(this.UpdateHandler));
     proxy.AddDelegate(PacketType.ImprovedTerseObjectUpdate, Direction.Incoming, new PacketDelegate(this.TerseUpdateHandler));
     interceptor.Name = "idontexist";
 }
예제 #16
0
 public IMLocatePlugin(PubComb plug)
 {
     form = new IMHistForm1(this);
     //    Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     plugin     = plug;
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     //this.brand = "IMLocate";
     proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Incoming, new PacketDelegate(IMs));
 }
예제 #17
0
        public RainbowParticlesPlugin(PubComb plug)
        {
            plugin     = plug;
            form       = new RainbowParticlesForm1(this);
            this.frame = plugin.frame;
            this.proxy = plugin.proxy;
            this.proxy.AddDelegate(PacketType.ScriptDialogReply, Direction.Outgoing, new PacketDelegate(OutDialogFromViewer));
            this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler));
            this.proxy.AddDelegate(PacketType.ViewerEffect, Direction.Outgoing, new PacketDelegate(OutViewerEffectHandler));

            GregTimer.Elapsed += new System.Timers.ElapsedEventHandler(GregTimer_Elapsed);
            GregTimer.Start();
        }
예제 #18
0
 public RetreatPlugin(PubComb plug)
 {
     form = new RetreatForm1(this);
     //    Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     plugin     = plug;
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.proxy.AddDelegate(PacketType.TerminateFriendship, Direction.Incoming, new PacketDelegate(ItsOver));
     this.proxy.AddDelegate(PacketType.UUIDNameReply, Direction.Incoming, new PacketDelegate(GotTheirName));
 }
예제 #19
0
 public DisableCapsPlugin(PubComb plug)
 {
     //formthread = new Thread(new ThreadStart(delegate()
     //{
     form = new CapsForm1(this);
     //  Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     plugin = plug;
     //   plugin.tabform.addATab(form, "Disable Caps");
     this.frame = plug.frame;
     this.proxy = plug.proxy;
 }
예제 #20
0
파일: coin.cs 프로젝트: zadark/par
        public coin(PubComb plug)
        {
            plugin     = plug;
            this.frame = plug.frame;

            frame.proxy.AddDelegate(PacketType.AgentSetAppearance, Direction.Outgoing, coinage);

            //formthread = new Thread(new ThreadStart(delegate()
            //{
            form = new CoinForm1(this);
            //}));
            //formthread.SetApartmentState(ApartmentState.STA);
            //formthread.Start();
        }
예제 #21
0
파일: SpamBlock.cs 프로젝트: zadark/par
 public SpamBlocker(PubComb plug)
 {
     plugin     = plug;
     shared     = plug.SharedInfo;
     form       = new SpamBlockForm1(this);
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     this.proxy.AddDelegate(PacketType.ChangeUserRights, Direction.Incoming, new PacketDelegate(this.UserRights));
     this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Incoming, new PacketDelegate(this.InIM));
     this.proxy.AddDelegate(PacketType.ScriptDialog, Direction.Incoming, new PacketDelegate(this.Dialogs));
     this.proxy.AddDelegate(PacketType.SoundTrigger, Direction.Incoming, new PacketDelegate(this.InTSound));
     this.proxy.AddDelegate(PacketType.AttachedSound, Direction.Incoming, new PacketDelegate(this.InASound));
     this.proxy.AddDelegate(PacketType.ScriptTeleportRequest, Direction.Incoming, new PacketDelegate(this.InMap));
 }
예제 #22
0
파일: PubCombTab.cs 프로젝트: zadark/par
        //private Form _WinForm;

        public PubComb(ProxyFrame frame)
        {
            //MessageBox.Show("called");

            //this._WinForm=form;
            this.frame = frame;
            this.proxy = frame.proxy;
            SharedInfo = new Aux_SharedInfo(this);

            //plugins.Add(new SpamBlocker(this));
            plugins.Add(new ClientDetection(this));
            plugins.Add(new LyraPlugin(this));
            plugins.Add(new HandicapPlugin(this));
            plugins.Add(new PennyPlugin(this));
            //plugins.Add(new PAnim(this));
            //plugins.Add(new DisableCapsPlugin(this));
            //plugins.Add(new IMLocatePlugin(this));
            plugins.Add(new LeetPlugin(this));
            //plugins.Add(new CinderellaPlugin(this));
            plugins.Add(new ProfileFunPlugin(this));
            plugins.Add(new SitAnywherePlugin(this));
            plugins.Add(new HighPlugin(this));
            plugins.Add(new RadarChatPlugin(this));
            plugins.Add(new FileProtectPlugin(this));
            //plugins.Add(new InvFunPlugin(this));
            plugins.Add(new RainbowParticlesPlugin(this));
            //causing problems :(
            //plugins.Add(new coin(this));
            plugins.Add(new RetreatPlugin(this));
            //plugins.Add(new AwesomeSauce(this));
            plugins.Add(new ProTextPlug(this));
            plugins.Add(new ViewerEffectLogPlugin(this));
            plugins.Add(new AvatarTracker(this));
            //plugins.Add(new CliIntPlugin(this));
            plugins.Add(new SitBlockPlugin(this));
            plugins.Add(new ShadowPlugin(this));
            plugins.Add(new useful(this));

            //tabformthread = new Thread(new ThreadStart(delegate()
            //{
            //    tabform = new TabItem(this);
            //    Application.Run(tabform);
            //}));
            //tabformthread.SetApartmentState(ApartmentState.STA);
            //tabformthread.Start();
        }
예제 #23
0
파일: AvatarInfo.cs 프로젝트: zadark/par
        public AvatarTracker(PubComb plugin)
        {
            this.plugin     = plugin;
            this.frame      = plugin.frame;
            this.proxy      = plugin.frame.proxy;
            this.SharedInfo = plugin.SharedInfo;

            this.proxy.AddDelegate(PacketType.ObjectUpdate, Direction.Incoming, new PacketDelegate(InObjectUpdateHandler));
            this.proxy.AddDelegate(PacketType.ImprovedTerseObjectUpdate, Direction.Incoming, new PacketDelegate(InImprovedTerseObjectUpdateHandler));
            this.proxy.AddDelegate(PacketType.KillObject, Direction.Incoming, new PacketDelegate(InKillObjectHandler));
            this.proxy.AddDelegate(PacketType.DisableSimulator, Direction.Incoming, new PacketDelegate(InDisableSimulatorHandler));
            form = new FormAvatars(this);

            //formthread = new Thread(new ThreadStart(showform));
            //formthread.SetApartmentState(ApartmentState.STA);
            //formthread.Start();
        }
예제 #24
0
파일: Penny.cs 프로젝트: zadark/par
        public PennyPlugin(PubComb plug)
        {
            plugin = plug;
            //formthread = new Thread(new ThreadStart(delegate()
            //{
            form = new PennyForm1(this);
            //   Application.Run(form);
            //}));
            //formthread.SetApartmentState(ApartmentState.STA);
            //formthread.Start();


            this.frame = plugin.frame;
            this.proxy = plugin.proxy;
            //this.brand = "Penny";
            proxy.AddDelegate(PacketType.AgentSetAppearance, Direction.Outgoing, new PacketDelegate(ApHand));
        }
예제 #25
0
파일: Lyra.cs 프로젝트: zadark/par
 public LyraPlugin(PubComb plug)
 {
     //formthread = new Thread(new ThreadStart(delegate()
     //{
     //    form = new LyraForm1(this);
     //    Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     plugin = plug;
     form   = new LyraForm1(this);
     //plug.tabform.addATab(form, "LYRA");
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     // this.brand = "Lyra";
     proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(SimChat));
     proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, new PacketDelegate(Age));
 }
예제 #26
0
 public PAnim(PubComb plug)
 {
     plugin = plug;
     //formthread = new Thread(new ThreadStart(delegate()
     //{
     form = new ProtAnimForm1(this);
     //    Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     //    plug.tabform.addATab(form, "ProtAnim");
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     //this.brand = "ProtAnim";
     this.proxy.AddDelegate(PacketType.TransferRequest, Direction.Outgoing, new PacketDelegate(TransferRequestHandler));
     this.proxy.AddDelegate(PacketType.TransferInfo, Direction.Incoming, new PacketDelegate(TransferInfoHandler));
     this.proxy.AddDelegate(PacketType.TransferPacket, Direction.Incoming, new PacketDelegate(TransferPacketHandler));
 }
예제 #27
0
파일: ClientDetect.cs 프로젝트: zadark/par
        public ClientDetection(PubComb plugin)
        {
            //formthread = new Thread(new ThreadStart(delegate()
            //{
            form = new ClientDetectForm1(this);
            //  Application.Run(form);
            //}));
            //formthread.SetApartmentState(ApartmentState.STA);
            //formthread.Start();*/
            this.plugin = plugin;

            this.frame      = plugin.frame;
            this.proxy      = plugin.frame.proxy;
            this.SharedInfo = plugin.SharedInfo;

            this.proxy.AddDelegate(PacketType.ObjectUpdate, Direction.Incoming, new PacketDelegate(inObj));
            this.proxy.AddDelegate(PacketType.AvatarAppearance, Direction.Incoming, new PacketDelegate(inClo));
        }
예제 #28
0
        public bool LoadAssembly(PluginInfo pinfo, ProxyFrame proxy)
        {
            try
            {
                pinfo.Modules.Clear();
                bool     started  = false;
                Assembly assembly = Assembly.LoadFile(System.IO.Path.GetFullPath(pinfo.Path));
                foreach (Type t in assembly.GetTypes())
                {
                    if (t.IsSubclassOf(typeof(ProxyPlugin)))
                    {
                        ConstructorInfo info = t.GetConstructor(new Type[] { typeof(ProxyFrame) });
                        if (info == null)
                        {
                            OpenMetaverse.Logger.Log(string.Format("No suitable contructor for {0} in {1}", t.ToString(), pinfo.Name), OpenMetaverse.Helpers.LogLevel.Warning);
                        }
                        else
                        {
                            ProxyPlugin plugin = (ProxyPlugin)info.Invoke(new object[] { proxy });
                            plugin.Init();
                            pinfo.Modules.Add(t.ToString());
                            started = true;
                        }
                    }
                }

                if (started)
                {
                    OpenMetaverse.Logger.Log(string.Format("Loaded {0} plugins from {1}: {2}", pinfo.Modules.Count.ToString(), pinfo.Name, string.Join(", ", pinfo.Modules.ToArray())), OpenMetaverse.Helpers.LogLevel.Info);
                }
                else
                {
                    OpenMetaverse.Logger.Log("Found no plugins in " + pinfo.Name, OpenMetaverse.Helpers.LogLevel.Warning);
                }

                return(started);
            }
            catch (Exception e)
            {
                OpenMetaverse.Logger.Log("Failed loading plugins from " + pinfo.Path + ": " + e.Message, OpenMetaverse.Helpers.LogLevel.Error);
            }

            return(false);
        }
예제 #29
0
파일: LeetPlugin.cs 프로젝트: zadark/par
        public LeetPlugin(PubComb plug)
        {
            plugin = plug;

            //formthread = new Thread(new ThreadStart(delegate()
            //{
            form = new leetForm1(this);
            //   Application.Run(form);
            //}));
            //formthread.SetApartmentState(ApartmentState.STA);
            //formthread.Start();

            this.frame = plug.frame;
            this.proxy = plug.proxy;
            this.brand = "ls";
            this.proxy.AddDelegate(PacketType.ScriptDialogReply, Direction.Outgoing, new PacketDelegate(OutDialogFromViewer));
            this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler));
            this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Outgoing, new PacketDelegate(SendingIM));
        }
예제 #30
0
파일: Handicap.cs 프로젝트: zadark/par
 public HandicapPlugin(PubComb plug)
 {
     //formthread = new Thread(new ThreadStart(delegate()
     //{
     form = new HandiForm1(this);
     //    Application.Run(form);
     //}));
     //formthread.SetApartmentState(ApartmentState.STA);
     //formthread.Start();
     plugin     = plug;
     this.frame = plug.frame;
     this.proxy = plug.proxy;
     //plug.tabform.addATab(form, "Handicap");
     this.proxy.AddDelegate(PacketType.GenericMessage, Direction.Outgoing, new PacketDelegate(OutAutoPilot));
     //this.proxy.AddDelegate(PacketType.GenericMessage, Direction.Incoming, new PacketDelegate(OutAutoPilot));
     this.proxy.AddDelegate(PacketType.ScriptDialogReply, Direction.Outgoing, new PacketDelegate(OutDialogFromViewer));
     this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler));
     //this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Outgoing, new PacketDelegate(SendingIM));
 }
        /// <summary>
        /// The method initialize frame by given rows and columns.
        /// </summary>
        /// <param name="rows">The rows of the frame.</param>
        /// <param name="cols">The columns of the frame.</param>
        public void InitializeFrame(int rows, int cols)
        {
            IFrame proxyFrame;

            try
            {
                proxyFrame = new ProxyFrame(new Frame(new ITile[rows, cols]));
            }
            catch
            {
                proxyFrame = new ProxyFrame(new Frame(new ITile[Constants.FrameDimensionMin, Constants.FrameDimensionMin]));
            }

            this.Frame = proxyFrame;
        }