diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-10 16:54:25 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-06-10 16:54:25 +0200 |
commit | b7914c4c6ac89170f3c5b4dab8f801c3c7d1c7d7 (patch) | |
tree | efcd9f78c2b75ad645ee2d355b592cae852276a9 | |
parent | 242381cfd012edbba3f502aaa287aa4a3806dddf (diff) | |
download | profani-tty-b7914c4c6ac89170f3c5b4dab8f801c3c7d1c7d7.tar.gz |
editor: use status to check for being online
-rw-r--r-- | src/command/cmd_funcs.c | 7 |
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; } |