diff options
author | James Booth <boothj5@gmail.com> | 2015-10-15 23:32:47 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-15 23:32:47 +0100 |
commit | ea4fb2ce6c1aa4f602447b8600ddce176df24c37 (patch) | |
tree | d37f67eed6aca9e547977ef08a7498d496785366 /src | |
parent | 904a5a81cfcc19c7029f0a961cfb97f7d1a2fe9f (diff) | |
download | profani-tty-ea4fb2ce6c1aa4f602447b8600ddce176df24c37.tar.gz |
Allow /lastactivity on|off when not connected
Diffstat (limited to 'src')
-rw-r--r-- | src/command/commands.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 6e8ccfd9..a58b8397 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3271,6 +3271,10 @@ cmd_disco(ProfWin *window, const char * const command, gchar **args) gboolean cmd_lastactivity(ProfWin *window, const char * const command, gchar **args) { + if ((g_strcmp0(args[0], "on") == 0) || (g_strcmp0(args[0], "off") == 0)) { + return _cmd_set_boolean_preference(args[0], command, "Last activity", PREF_LASTACTIVITY); + } + jabber_conn_status_t conn_status = jabber_get_connection_status(); if (conn_status != JABBER_CONNECTED) { @@ -3288,10 +3292,6 @@ cmd_lastactivity(ProfWin *window, const char * const command, gchar **args) jid_destroy(jidp); return TRUE; - - } else if ((g_strcmp0(args[0], "on") == 0) || (g_strcmp0(args[0], "off") == 0)) { - return _cmd_set_boolean_preference(args[0], command, "Last activity responses", PREF_LASTACTIVITY); - } else { iq_last_activity_request(args[0]); return TRUE; |