# HG changeset patch # User Mikael Berthe # Date 1267388718 -3600 # Node ID 4e57d6275a8662d478bf5de034a42637acaa2cb5 # Parent 4fbfae993c24241a4263da7b58f4aa5008730d42 Allow status command in the configuration file diff -r 4fbfae993c24 -r 4e57d6275a86 mcabber/mcabber/commands.c --- 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 diff -r 4fbfae993c24 -r 4e57d6275a86 mcabber/mcabber/settings.c --- 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) &&