//
// Radegast Metaverse Client
-// Copyright (c) 2009-2012, Radegast Development Team
+// Copyright (c) 2009-2014, Radegast Development Team
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
void Self_ScriptDialog(object sender, ScriptDialogEventArgs e)
{
+ if (instance.MainForm.InvokeRequired)
+ {
+ instance.MainForm.BeginInvoke(new MethodInvoker(() => Self_ScriptDialog(sender, e)));
+ return;
+ }
+
// Is this object muted
if (null != client.Self.MuteList.Find(m => (m.Type == MuteType.Object && m.ID == e.ObjectID) // muted object by id
|| (m.Type == MuteType.ByName && m.Name == e.ObjectName) // object muted by name
|| (m.Type == MuteType.ByName && m.Name == e.ObjectName) // object muted by name
)) return;
- instance.MainForm.AddNotification(new ntfPermissions(instance, e.Simulator, e.TaskID, e.ItemID, e.ObjectName, e.ObjectOwnerName, e.Questions));
+ if (instance.GlobalSettings["on_script_question"] == "Auto Accept")
+ {
+ instance.Client.Self.ScriptQuestionReply(e.Simulator, e.ItemID, e.TaskID, e.Questions);
+ }
+ else if (instance.GlobalSettings["on_script_question"] == "Auto Decline")
+ {
+ instance.Client.Self.ScriptQuestionReply(e.Simulator, e.ItemID, e.TaskID, 0);
+ }
+ else
+ {
+ instance.MainForm.AddNotification(new ntfPermissions(instance, e.Simulator, e.TaskID, e.ItemID, e.ObjectName, e.ObjectOwnerName, e.Questions));
+ }
}
private void netcom_ClientLoginStatus(object sender, LoginProgressEventArgs e)
// Messaage from someone we muted?
if (null != client.Self.MuteList.Find(me => me.Type == MuteType.Resident && me.ID == e.IM.FromAgentID)) return;
+ try
+ {
+ if (instance.State.LSLHelper.ProcessIM(e))
+ {
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ Logger.Log("Failed executing automation action: " + ex.ToString(), Helpers.LogLevel.Warning);
+ }
+
switch (e.IM.Dialog)
{
case InstantMessageDialog.SessionSend:
{ // conference
HandleConferenceIM(e);
}
+ else if (e.IM.IMSessionID == UUID.Zero)
+ {
+ String msg = string.Format("Message from {0}: {1}", instance.Names.Get(e.IM.FromAgentID, e.IM.FromAgentName), e.IM.Message);
+ instance.MainForm.AddNotification(new ntfGeneric(instance, msg));
+ DisplayNotificationInChat(msg);
+ }
else
{
HandleIM(e);
}
break;
+ case InstantMessageDialog.RequestLure:
+ instance.MainForm.AddNotification(new ntfRequestLure(instance, e.IM));
+ break;
+
case InstantMessageDialog.GroupInvitation:
instance.MainForm.AddNotification(new ntfGroupInvitation(instance, e.IM));
break;