From fadafd2588f7d8ecaf6f32210ee156e4df0998f0 Mon Sep 17 00:00:00 2001
From: Salanto <62221668+Salanto@users.noreply.github.com>
Date: Tue, 10 Aug 2021 20:06:05 +0200
Subject: [PATCH] Notify target client of uninvite

---
 core/src/commands/area.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/src/commands/area.cpp b/core/src/commands/area.cpp
index f4524f3..014d506 100644
--- a/core/src/commands/area.cpp
+++ b/core/src/commands/area.cpp
@@ -132,7 +132,9 @@ void AOClient::cmdUnInvite(int argc, QStringList argv)
         sendServerMessage("That does not look like a valid ID.");
         return;
     }
-    else if (server->getClientByID(uninvited_id) == nullptr) {
+
+    AOClient* target_client = server->getClientByID(uninvited_id);
+    if (target_client == nullptr) {
         sendServerMessage("No client with that ID found.");
         return;
     }
@@ -145,6 +147,7 @@ void AOClient::cmdUnInvite(int argc, QStringList argv)
         return;
     }
     sendServerMessage("You uninvited ID " + argv[0]);
+    target_client->sendServerMessage("You were uninvited from " + area->name());
 }
 
 void AOClient::cmdLock(int argc, QStringList argv)