Example #1
0
        protected void alertMessage(object o, AlertMessageEventArgs e)
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            args.Add("message ", e.Message);
            TriggerEvent("SimAlertMessage", args);
        }
Example #2
0
        protected void JsonChatControler(string message, string sender_name, UUID sender_uuid, bool avatar, bool group, UUID group_uuid, bool localchat, bool fromme)
        {
            if ((group == true) || (localchat == true) || (fromme == true))
            {
                return;
            }
            try
            {
                bool frommaster = true;
                if (sender_uuid != master_uuid)
                {
                    frommaster = false;
                }
                if (frommaster == true)
                {
                    if (message == "fakerestart")
                    {
                        AlertMessageEventArgs Alertargs = new AlertMessageEventArgs("this is a fake restart message", new Random().Next(99999).ToString(), new OpenMetaverse.StructuredData.OSDMap());
                        AlertEvent(this, Alertargs);
                        return;
                    }
                }
                JsonApiDefine APIE = JsonConvert.DeserializeObject <JsonApiDefine>(message);

                CoreCommandLib(sender_uuid, frommaster, APIE.cmd, APIE.args, APIE.signing, APIE.reply);
            }
            catch (Exception e)
            {
                LogFormater.Crit("[CoreCommandLib] exploded: " + e.Message + "");
            }
        }
Example #3
0
 protected virtual void OnAlertMessageReceived(AlertMessageEventArgs e)
 {
     if (AlertMessageReceived != null)
     {
         AlertMessageReceived(this, e);
     }
 }
Example #4
0
 protected void AlertMessage(object o, AlertMessageEventArgs e)
 {
     if (e.Message.ToLower().Contains("restart") == true)
     {
         returnHomeDisabled       = true;
         returnHomeDisabledUntill = helpers.UnixTimeNow() + (60 * 10);
         AvoidSim();
     }
 }
Example #5
0
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     if (e.Message.Contains("Autopilot cancel"))
     {
         if (IsWalking)
         {
             EndWalking();
         }
     }
 }
Example #6
0
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     if (e.NotificationId == "AutopilotCanceled")
     {
         if (IsWalking)
         {
             EndWalking();
         }
     }
 }
        private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
        {
            if (e.Message.ToLower().Contains("autopilot canceled"))
            {
                return;                                                     //workaround the stupid autopilot alerts
            }
            ChatBufferItem item = new ChatBufferItem(
                DateTime.Now, "Alert message", UUID.Zero, ": " + e.Message, ChatBufferTextStyle.Alert);

            ProcessBufferItem(item, true);
        }
Example #8
0
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     if (CanSyncInvoke)
     {
         NetcomSync.BeginInvoke(new OnAlertMessageRaise(OnAlertMessageReceived), new object[] { e });
     }
     else
     {
         OnAlertMessageReceived(e);
     }
 }
Example #9
0
        private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
        {
            if (e.NotificationId == "AutopilotCanceled")
            {
                return;
            }                                                        // workaround the stupid autopilot alerts

            ChatBufferItem item = new ChatBufferItem(
                DateTime.Now, "Alert message", UUID.Zero, ": " + e.Message, ChatBufferTextStyle.Alert);

            ProcessBufferItem(item, true);
        }
Example #10
0
 protected void AlertEvent(object sender, AlertMessageEventArgs e)
 {
     if (e.Message.Contains("restart") == true)
     {
         // oh snap region is dead run away
         ConsoleLog.Info("--- Sim Restarting ---");
         if (avoid_sims.ContainsKey(Client.Network.CurrentSim.Name) == false)
         {
             avoid_sims.Add(Client.Network.CurrentSim.Name, helpers.UnixTimeNow() + (10 * 60));
         }
         GotoNextHomeRegion(true);
     }
 }
Example #11
0
        private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
        {
            if (e.NotificationId == "AutopilotCanceled")
            {
                return;
            }

            // Pop up a notification for region restarts
            if (e.NotificationId == "RegionRestartMinutes")
            {
                int    minutes = e.ExtraParams["MINUTES"].AsInteger();
                string name    = e.ExtraParams["NAME"].AsString();
                instance.MainForm.AddNotification(new ntfRegionRestart(instance, name, minutes * 60));
            }
            else if (e.NotificationId == "RegionRestartSeconds")
            {
                int    seconds = e.ExtraParams["SECONDS"].AsInteger();
                string name    = e.ExtraParams["NAME"].AsString();
                instance.MainForm.AddNotification(new ntfRegionRestart(instance, name, seconds));
            }

            Tabs["chat"].Highlight();
        }
Example #12
0
        private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
        {
            tabs["chat"].Highlight();

            string ttl = "METAbolt Alert";
            string body = e.Message.ToString();
            TrayNotifiy(ttl, body);
        }
Example #13
0
 private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
 {
     tabs["chat"].Highlight();
 }
Example #14
0
 private void OnAlertMessage(object sender, AlertMessageEventArgs e)
 {
     Talker.Say(e.Message);
 }
Example #15
0
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     LogText(e.Message, Color.Gray);
 }
Example #16
0
 private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
 {
     //Console.WriteLine("Message Received");
 }
Example #17
0
 public override void Self_OnAlertMessage(object sender, AlertMessageEventArgs e)
 {
     EventQueue.Enqueue(() => SendNewRegionEvent(SimEventType.SCRIPT, "On-Alert-Message", client.gridClient, e.Message));
 }
 protected virtual void OnAlertMessageReceived(AlertMessageEventArgs e)
 {
     AlertMessageReceived?.Invoke(this, e);
 }
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     LogText(e.Message, Color.Gray);
 }
Example #20
0
        protected void AlertEvent(object sender, AlertMessageEventArgs e)
        {
            EventHandler <AlertMessageEventArgs> handler = _AlertMessage;

            handler?.Invoke(this, e);
        }
Example #21
0
        private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e)
        {
            if (e.Message.ToLower(CultureInfo.CurrentCulture).Contains("autopilot canceled")) return; //workaround the stupid autopilot alerts

            string emsg = e.Message.Trim();

            if (emsg.Contains("RESTART_X_MINUTES"))
            {
                string[] mins = emsg.Split(new Char[] { ' ' });
                emsg = "Region is restarting in " + mins[1].Trim() + " minutes. If you remain in this region you will be logged out.";
                netcom.ChatOut(emsg, ChatType.Normal, 123456);
            }

            ChatBufferItem item = new ChatBufferItem(
                DateTime.Now, " Alert message: " + emsg, ChatBufferTextStyle.Alert);

            ProcessBufferItem(item, true);
        }