From 13017885ed44f576f9f2cfb86d5d139c34424139 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 19 Nov 2010 17:29:26 +0000 Subject: [PATCH] Notify on display name changes. git-svn-id: https://radegast.googlecode.com/svn/trunk@765 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- Radegast/GUI/Consoles/TabsConsole.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Radegast/GUI/Consoles/TabsConsole.cs b/Radegast/GUI/Consoles/TabsConsole.cs index cb0387c..5e009f6 100644 --- a/Radegast/GUI/Consoles/TabsConsole.cs +++ b/Radegast/GUI/Consoles/TabsConsole.cs @@ -151,6 +151,7 @@ namespace Radegast client.Self.ScriptQuestion += new EventHandler(Self_ScriptQuestion); client.Self.ScriptDialog += new EventHandler(Self_ScriptDialog); client.Self.LoadURL += new EventHandler(Self_LoadURL); + client.Avatars.DisplayNameUpdate += new EventHandler(Avatars_DisplayNameUpdate); } private void UnregisterClientEvents(GridClient client) @@ -158,6 +159,7 @@ namespace Radegast client.Self.ScriptQuestion -= new EventHandler(Self_ScriptQuestion); client.Self.ScriptDialog -= new EventHandler(Self_ScriptDialog); client.Self.LoadURL -= new EventHandler(Self_LoadURL); + client.Avatars.DisplayNameUpdate -= new EventHandler(Avatars_DisplayNameUpdate); } void instance_ClientChanged(object sender, ClientChangedEventArgs e) @@ -246,6 +248,11 @@ namespace Radegast DisplayNotificationInChat("Disconnected: " + e.Message, ChatBufferTextStyle.Error); } + void Avatars_DisplayNameUpdate(object sender, DisplayNameUpdateEventArgs e) + { + DisplayNotificationInChat(string.Format("({0}) is now known as {1}", e.DisplayName.UserName, e.DisplayName.DisplayName)); + } + private void netcom_AlertMessageReceived(object sender, AlertMessageEventArgs e) { tabs["chat"].Highlight(); -- 2.11.0