From cd477e8ce70ab0df179c0676ae50a14a8a541037 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 11 Aug 2019 22:44:07 -0700 Subject: [PATCH] modules/console: Add some basic feedback on user mxid cmd. --- modules/console.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/console.cc b/modules/console.cc index 07d8fc51d..49e7e2926 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -10096,6 +10096,18 @@ console_id__user(opt &out, const m::user::id &id, const string_view &args) { + const bool exists + { + m::exists(id) + }; + + if(!exists) + throw m::NOT_FOUND + { + "User %s is not known to this server.", + string_view{id}, + }; + return true; }