From b7914c4c6ac89170f3c5b4dab8f801c3c7d1c7d7 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 10 Jun 2021 16:54:25 +0200 Subject: [PATCH] editor: use status to check for being online --- src/command/cmd_funcs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 0e2deba9..5f205191 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9403,9 +9403,10 @@ cmd_change_password(ProfWin* window, const char* const command, gchar** args) gboolean cmd_editor(ProfWin* window, const char* const command, gchar** args) { - xmpp_ctx_t* const ctx = connection_get_ctx(); - if (!ctx) { - log_debug("Editor: no connection"); + jabber_conn_status_t conn_status = connection_get_status(); + + if (conn_status != JABBER_CONNECTED) { + cons_show("You are currently not connected."); return TRUE; }