Mercurial > hg
changeset 1732:4e57d6275a86
Allow status command in the configuration file
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 28 Feb 2010 21:25:18 +0100 |
parents | 4fbfae993c24 |
children | a9b0364c0cb2 |
files | mcabber/mcabber/commands.c mcabber/mcabber/settings.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c Sun Feb 28 18:50:30 2010 +0100 +++ b/mcabber/mcabber/commands.c Sun Feb 28 21:25:18 2010 +0100 @@ -888,10 +888,9 @@ char *msg; enum imstatus st; - if (!xmpp_is_online()) { - scr_LogPrint(LPRINT_NORMAL, "You are not connected."); - return; - } + if (!xmpp_is_online()) + scr_LogPrint(LPRINT_NORMAL, "You are currently not connected..."); + // We do not return now, so that the status is memorized and used later... // It makes sense to reset autoaway before changing the status // (esp. for FIFO or remote commands) or the behaviour could be
--- a/mcabber/mcabber/settings.c Sun Feb 28 18:50:30 2010 +0100 +++ b/mcabber/mcabber/settings.c Sun Feb 28 21:25:18 2010 +0100 @@ -189,6 +189,7 @@ #ifdef MODULES_ENABLE startswith(line, "load ", FALSE) || #endif + startswith(line, "status ", FALSE) || startswith(line, "otrpolicy", FALSE)) { // Only accept a few "safe" commands if (!runtime && @@ -197,6 +198,7 @@ !startswith(line, "alias ", FALSE) && !startswith(line, "pgp ", FALSE) && !startswith(line, "source ", FALSE) && + !startswith(line, "status ", FALSE) && !startswith(line, "color ", FALSE) && #ifdef MODULES_ENABLE !startswith(line, "load ", FALSE) &&