protected void alertMessage(object o, AlertMessageEventArgs e) { Dictionary <string, string> args = new Dictionary <string, string>(); args.Add("message ", e.Message); TriggerEvent("SimAlertMessage", args); }
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 + ""); } }
protected virtual void OnAlertMessageReceived(AlertMessageEventArgs e) { if (AlertMessageReceived != null) { AlertMessageReceived(this, e); } }
protected void AlertMessage(object o, AlertMessageEventArgs e) { if (e.Message.ToLower().Contains("restart") == true) { returnHomeDisabled = true; returnHomeDisabledUntill = helpers.UnixTimeNow() + (60 * 10); AvoidSim(); } }
void Self_AlertMessage(object sender, AlertMessageEventArgs e) { if (e.Message.Contains("Autopilot cancel")) { if (IsWalking) { EndWalking(); } } }
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); }
void Self_AlertMessage(object sender, AlertMessageEventArgs e) { if (CanSyncInvoke) { NetcomSync.BeginInvoke(new OnAlertMessageRaise(OnAlertMessageReceived), new object[] { e }); } else { OnAlertMessageReceived(e); } }
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); }
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); } }
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(); }
private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e) { tabs["chat"].Highlight(); string ttl = "METAbolt Alert"; string body = e.Message.ToString(); TrayNotifiy(ttl, body); }
private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e) { tabs["chat"].Highlight(); }
private void OnAlertMessage(object sender, AlertMessageEventArgs e) { Talker.Say(e.Message); }
void Self_AlertMessage(object sender, AlertMessageEventArgs e) { LogText(e.Message, Color.Gray); }
private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e) { //Console.WriteLine("Message Received"); }
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); }
protected void AlertEvent(object sender, AlertMessageEventArgs e) { EventHandler <AlertMessageEventArgs> handler = _AlertMessage; handler?.Invoke(this, e); }
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); }