From 8dda373a5b6a9420fe55fa4aed7ed5eb901d04a6 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 26 Oct 2011 14:17:26 +0000 Subject: [PATCH] RAD-312: Due to SL protocol change, group notices don't show group name or logo git-svn-id: https://radegast.googlecode.com/svn/trunk@1179 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- .../GUI/Notifications/GroupNoticeNotification.cs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Radegast/GUI/Notifications/GroupNoticeNotification.cs b/Radegast/GUI/Notifications/GroupNoticeNotification.cs index 0b4f916..4dfd719 100644 --- a/Radegast/GUI/Notifications/GroupNoticeNotification.cs +++ b/Radegast/GUI/Notifications/GroupNoticeNotification.cs @@ -66,20 +66,26 @@ namespace Radegast } string group = string.Empty; - string text = msg.Message.Replace("\n", System.Environment.NewLine); - int pos = msg.Message.IndexOf('|'); - string title = msg.Message.Substring(0, pos); - text = text.Remove(0, pos + 1); - if (instance.Groups.ContainsKey(msg.FromAgentID)) + if (msg.BinaryBucket.Length >= 18) { - group = instance.Groups[msg.FromAgentID].Name; - if (instance.Groups[msg.FromAgentID].InsigniaID != UUID.Zero) + UUID groupID = new UUID(msg.BinaryBucket, 2); + + if (instance.Groups.ContainsKey(groupID)) { - imgGroup.Init(instance, instance.Groups[msg.FromAgentID].InsigniaID, string.Empty); + group = instance.Groups[groupID].Name; + if (instance.Groups[groupID].InsigniaID != UUID.Zero) + { + imgGroup.Init(instance, instance.Groups[groupID].InsigniaID, string.Empty); + } } } + string text = msg.Message.Replace("\n", System.Environment.NewLine); + int pos = msg.Message.IndexOf('|'); + string title = msg.Message.Substring(0, pos); + text = text.Remove(0, pos + 1); + lblTitle.Text = title; lblSentBy.Text = string.Format("Sent by {0}, {1}", msg.FromAgentName, group); txtNotice.Text = text; -- 2.11.0