about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-06-10 16:54:25 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-06-10 16:54:25 +0200
commitb7914c4c6ac89170f3c5b4dab8f801c3c7d1c7d7 (patch)
treeefcd9f78c2b75ad645ee2d355b592cae852276a9
parent242381cfd012edbba3f502aaa287aa4a3806dddf (diff)
downloadprofani-tty-b7914c4c6ac89170f3c5b4dab8f801c3c7d1c7d7.tar.gz
editor: use status to check for being online
-rw-r--r--src/command/cmd_funcs.c7
1 files 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;
     }