From 0c2ea15f4d79f16b76943a499c3edf340bd719a2 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Sat, 25 Apr 2020 23:51:46 +0100 Subject: [PATCH] adds relay IM from bot to avatar support --- Core/bottypes/MessageSwitcherBot.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Core/bottypes/MessageSwitcherBot.cs b/Core/bottypes/MessageSwitcherBot.cs index cc79a7a..f8110ea 100644 --- a/Core/bottypes/MessageSwitcherBot.cs +++ b/Core/bottypes/MessageSwitcherBot.cs @@ -50,6 +50,19 @@ namespace BSB.bottypes { if (localchat == false) { + if(avatar == true) + { + if(myconfig.RelayImToAvatar != UUID.Zero.ToString()) + { + if (myconfig.RelayImToAvatar.Length == UUID.Zero.ToString().Length) + { + if(UUID.TryParse(myconfig.RelayImToAvatar,out UUID targetav) == true) + { + Client.Self.InstantMessage(targetav, "Relay-> "+sender_name+": " + message + ""); + } + } + } + } if (avatar == false) { bool signed_command = false;