add-offline-message.diff
author Myhailo Danylenko <isbear@ukrpost.net>
Sat, 07 Nov 2015 17:49:58 +0200
changeset 89 ce4c4447dbd4
parent 88 0a87df8ad9c1
child 92 66f7e2aa040c
permissions -rw-r--r--
[add-cmake] Update version

# HG changeset patch
# Parent 99ffc1bfe836f0fe094e0a9e3564521a09b39458
# Parent  6d9f7b9e620dde7a6fda44af197260f4ae8f4b13
Allow to specify status message, when going offline

diff -r 6d9f7b9e620d mcabber/ChangeLog.api
--- a/mcabber/ChangeLog.api	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/ChangeLog.api	Sat Nov 07 14:54:34 2015 +0200
@@ -1,3 +1,10 @@
+experimental (46)
+
+ * experimental patch add-offline-message.diff
+ * xmpp_disconnect() now accepts status message
+
+  -- Myhailo Danylenko, 2015-11-07
+
 experimental (45)
 
  * Change branch to "experimental".
@@ -45,6 +52,13 @@
 
   -- Mikael Berthe, 2015-10-04
 
+experimental (44)
+
+ * experimental patch add-offline-message.diff
+ * xmpp_disconnect() now accepts status message
+
+  -- Myhailo Danylenko, 2014-11-11
+
 experimental (43)
 
  * Change branch to "experimental".
@@ -136,6 +150,13 @@
 
   -- Mikael Berthe, 2013-09-29
 
+experimental (42)
+
+ * experimental patch add-offline-message.diff
+ * xmpp_disconnect() now accepts status message
+
+  -- Myhailo Danylenko, 2012-11-30
+
 experimental (41)
 
  * Change branch to "experimental".
@@ -154,6 +175,13 @@
 
   -- Mikael Berthe, 2013-04-28
 
+experimental (40)
+
+ * experimental patch add-offline-message.diff
+ * xmpp_disconnect() now accepts status message
+
+  -- Myhailo Danylenko, 2012-11-30
+
 experimental (39)
 
  * Change branch to "experimental".
@@ -171,6 +199,13 @@
 
   -- Mikael Berthe, 2012-11-28
 
+experimental (38)
+
+ * experimental patch add-offline-message
+ * xmpp_disconnect now accepts status message
+
+  -- Myhailo Danylenko, 2012-07-31
+
 experimental (37)
 
  * Change branch to "experimental".
@@ -189,6 +224,13 @@
 
   -- Myhailo Danylenko, 2012-10-20
 
+experimental (36)
+
+ * experimental patch add-offline-message
+ * xmpp_disconnect now accepts status message
+
+  -- Myhailo Danylenko, 2012-07-31
+
 experimental (35)
 
  * Change branch to "experimental".
diff -r 6d9f7b9e620d mcabber/doc/help/cs/hlp.txt
--- a/mcabber/doc/help/cs/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/cs/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Zobrazí nápovědu k příkazu nebo tématu.
 
-Dostupné příkazy jsou: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Dostupné příkazy jsou: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/cs/hlp_disconnect.txt
--- a/mcabber/doc/help/cs/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/cs/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Ukončí spojení s Jabber serverem.
+You can specify status message to disconnect with.
 Poznámka: Seznam kontaktů (roster) je přístupný pouze v době, kdy je spojení aktivní. Po odpojení od serveru je proto prázdný.
diff -r 6d9f7b9e620d mcabber/doc/help/cs/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/cs/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/de/hlp.txt
--- a/mcabber/doc/help/de/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/de/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Zeigt die Hilfe zu einem Befehl oder ein Thema an.
 Wenn kein Argument gegeben ist, wird diese Hilfe angezeigt.
-Verfügbare Befehle: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Verfügbare Befehle: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/de/hlp_disconnect.txt
--- a/mcabber/doc/help/de/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/de/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Die Verbindung zum Jabber Server trennen.
+You can specify status message to disconnect with.
 Denke daran, dass der Roster nur verfügbar ist wenn man mit dem Jabber Server verbunden ist. Somit ist die Buddyliste auch leer, wenn man sich beim Server abmeldet.
diff -r 6d9f7b9e620d mcabber/doc/help/de/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/de/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/en/hlp.txt
--- a/mcabber/doc/help/en/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/en/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Display some help about a command or a topic.
 If no argument provided a usage of this command is printed.
-Available commands: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Available commands: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/en/hlp_disconnect.txt
--- a/mcabber/doc/help/en/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/en/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Terminate the connection to the Jabber server.
+You can specify status message to disconnect with.
 Note: the roster is only available when the connection to the server is active, so the buddylist is empty when disconnected.
diff -r 6d9f7b9e620d mcabber/doc/help/en/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/en/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/fr/hlp.txt
--- a/mcabber/doc/help/fr/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/fr/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -2,4 +2,4 @@
  /HELP [commande|+sujet]
 
 Affiche de l'aide sur la commande ou le sujet demandé.
-Les commandes disponibles sont : add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Les commandes disponibles sont : add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/fr/hlp_disconnect.txt
--- a/mcabber/doc/help/fr/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/fr/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Ferme la connexion au serveur Jabber.
+You can specify status message to disconnect with.
 Remarque : le roster n'est disponible que lorsque la connexion au serveur estactive, donc la liste de contacts est vide après déconnexion.
diff -r 6d9f7b9e620d mcabber/doc/help/fr/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/fr/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/it/hlp.txt
--- a/mcabber/doc/help/it/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/it/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Mostra l'help relativo a comando o ad argomento.
 Se non viene specificato alcun argomento, viene visualizzato l'utilizzo del comando corrente.
-I comandi disponibili sono: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+I comandi disponibili sono: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/it/hlp_disconnect.txt
--- a/mcabber/doc/help/it/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/it/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Termina la connessione con il serve Jabber.
+You can specify status message to disconnect with.
 Nota: il roster è disponibile soltanto quando la connessione è attiva, quindi la lista dei contatti è vuota quando si è disconnessi.
diff -r 6d9f7b9e620d mcabber/doc/help/it/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/it/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/nl/hlp.txt
--- a/mcabber/doc/help/nl/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/nl/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Toon informatie over een commando of onderwerp.
 Als geen argument is meegegeven, wordt een tekst over het gebruik van dit commando getoond.
-Beschikbare commando's: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Beschikbare commando's: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/nl/hlp_disconnect.txt
--- a/mcabber/doc/help/nl/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/nl/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Beëindig de verbinding met de Jabber server.
+You can specify status message to disconnect with.
 NB: het Roster is alleen beschikbaar indien er een actieve verbinding met de server bestaat. De buddylijst is dus leeg indien niet verbonden.
diff -r 6d9f7b9e620d mcabber/doc/help/nl/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/nl/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/pl/hlp.txt
--- a/mcabber/doc/help/pl/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/pl/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Wyświetla pomoc dotyczącą danego polecenia lub tematu.
 Jeśli nie podano żadnego argumentu, zostanie wyświetlona pomoc o sposobie użycia.
-Dostępne polecenia: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Dostępne polecenia: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/pl/hlp_disconnect.txt
--- a/mcabber/doc/help/pl/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/pl/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [message]
 
 Przerywa połączenie z serwerem Jabbera.
-Uwaga: roster dostępny jest tylko gdy połączenie do serwera jest aktywne, zatem jeżeli nie jesteś połączony lista kontaktów jest pusta.
\ No newline at end of file
+You can specify status message to disconnect with.
+Uwaga: roster dostępny jest tylko gdy połączenie do serwera jest aktywne, zatem jeżeli nie jesteś połączony lista kontaktów jest pusta.
diff -r 6d9f7b9e620d mcabber/doc/help/pl/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/pl/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [message]
+
+Terminate all connections and exit mcabber.
+This command is the same as /QUIT, but you can specify status message to exit with.
diff -r 6d9f7b9e620d mcabber/doc/help/ru/hlp.txt
--- a/mcabber/doc/help/ru/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/ru/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Отображает файл помощи о запрошенной команде или топике.
 Если выполнить без аргументов, будут отображены допустимые команды.
-Допустимые команды: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Допустимые команды: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/ru/hlp_disconnect.txt
--- a/mcabber/doc/help/ru/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/ru/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [сообщение]
 
 Завершает соединение с Jabber-сервером.
+Вы можете указать сообщение статуса при выходе.
 Примечание: список контактов доступен только когда соединение с сервером активно, поэтому список контактов пуст при завершении соединения.
diff -r 6d9f7b9e620d mcabber/doc/help/ru/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/ru/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,6 @@
+
+ /EXIT [сообщение]
+
+
+Эта команда завершает все активные соединения и выходит из mcabber`а.
+Отличается от /QUIT тем, что позволяет указать сообщение статуса при выходе.
diff -r 6d9f7b9e620d mcabber/doc/help/uk/hlp.txt
--- a/mcabber/doc/help/uk/hlp.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/uk/hlp.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -3,4 +3,4 @@
 
 Друкує допоміжну інформацію про команду або вираз.
 Без аргументу друкує оце повідомлення.
-Наявні команди: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Наявні команди: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, exit, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
diff -r 6d9f7b9e620d mcabber/doc/help/uk/hlp_disconnect.txt
--- a/mcabber/doc/help/uk/hlp_disconnect.txt	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/doc/help/uk/hlp_disconnect.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -1,5 +1,6 @@
 
- /DISCONNECT
+ /DISCONNECT [повідомлення]
 
 Розірвати з'єднання з сервером.
+Ви можете вказати повідомлення статусу відсутності.
 Майте на увазі, що список контактів зберігається на сервері, отож після від'єднання ви його більше не побачите.
diff -r 6d9f7b9e620d mcabber/doc/help/uk/hlp_exit.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/doc/help/uk/hlp_exit.txt	Sat Nov 07 14:54:34 2015 +0200
@@ -0,0 +1,5 @@
+
+ /EXIT [повідомлення]
+
+Закриває всі з’єднання та завершує мкаббер.
+Відмінність цієї команди від /QUIT у тому, що ви можете вказати повідомлення статусу відсутності.
diff -r 6d9f7b9e620d mcabber/mcabber/api.h
--- a/mcabber/mcabber/api.h	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/api.h	Sat Nov 07 14:54:34 2015 +0200
@@ -4,8 +4,8 @@
 #include <glib.h>
 #include <mcabber/config.h> // For MCABBER_BRANCH
 
-#define MCABBER_API_VERSION 45
-#define MCABBER_API_MIN     45
+#define MCABBER_API_VERSION 46
+#define MCABBER_API_MIN     46
 
 #define MCABBER_BRANCH_EXPERIMENTAL 1
 
diff -r 6d9f7b9e620d mcabber/mcabber/commands.c
--- a/mcabber/mcabber/commands.c	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/commands.c	Sat Nov 07 14:54:34 2015 +0200
@@ -94,6 +94,7 @@
 static void do_echo(char *arg);
 static void do_module(char *arg);
 static void do_carbons(char *arg);
+static void do_exit(char *arg);
 
 static void room_bookmark(gpointer bud, char *arg);
 
@@ -201,6 +202,7 @@
   cmd_add("echo", "Display a string in the log window", 0, 0, &do_echo, NULL);
   cmd_add("event", "Process an event", COMPL_EVENTSID, COMPL_EVENTS, &do_event,
           NULL);
+  cmd_add("exit",  "Exit mcabber", 0, 0, &do_exit, NULL);
   cmd_add("group", "Change group display settings",
           COMPL_GROUP, COMPL_GROUPNAME, &do_group, NULL);
   cmd_add("help", "Display some help", COMPL_CMD, 0, &do_help, NULL);
@@ -4194,7 +4196,9 @@
 
 static void do_disconnect(char *arg)
 {
-  xmpp_disconnect();
+  char *message = to_utf8(arg);
+  xmpp_disconnect(message);
+  g_free(message);
 }
 
 static void do_help(char *arg)
@@ -4221,4 +4225,14 @@
   }
 }
 
+static void do_exit(char *arg)
+{
+  if (arg) {
+    char *message = to_utf8(arg);
+    settings_set(SETTINGS_TYPE_OPTION, "message_offline", message);
+    g_free(message);
+  }
+  mcabber_set_terminate_ui();
+}
+
 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */
diff -r 6d9f7b9e620d mcabber/mcabber/main.c
--- a/mcabber/mcabber/main.c	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/main.c	Sat Nov 07 14:54:34 2015 +0200
@@ -89,7 +89,7 @@
 #ifndef MODULES_ENABLE
   fifo_deinit();
 #endif
-  xmpp_disconnect();
+  xmpp_disconnect(NULL);
   scr_terminate_curses();
 
   // Restore term settings, if needed.
@@ -584,7 +584,7 @@
 #ifdef HAVE_LIBOTR
   otr_terminate();
 #endif
-  xmpp_disconnect();
+  xmpp_disconnect(NULL);
 #ifdef HAVE_GPGME
   gpg_terminate();
 #endif
diff -r 6d9f7b9e620d mcabber/mcabber/settings.c
--- a/mcabber/mcabber/settings.c	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/settings.c	Sat Nov 07 14:54:34 2015 +0200
@@ -439,7 +439,12 @@
 // - if no message is found, return NULL
 const gchar *settings_get_status_msg(enum imstatus status)
 {
-  const gchar *rstatus = settings_opt_get("message");
+  const gchar *rstatus;
+
+  if (status == offline)
+    return settings_opt_get("message_offline");
+
+  rstatus = settings_opt_get("message");
 
   if (rstatus) return rstatus;
 
@@ -464,7 +469,7 @@
         rstatus = settings_opt_get("message_away");
         break;
 
-    default: // offline, invisible
+    default: // ?
         break;
   }
   return rstatus;
diff -r 6d9f7b9e620d mcabber/mcabber/xmpp.c
--- a/mcabber/mcabber/xmpp.c	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/xmpp.c	Sat Nov 07 14:54:34 2015 +0200
@@ -793,7 +793,7 @@
 
 static void _try_to_reconnect(void)
 {
-  xmpp_disconnect();
+  xmpp_disconnect(NULL);
   if (AutoConnection)
     g_timeout_add_seconds(RECONNECTION_TIMEOUT + (random() % 90L),
                           xmpp_reconnect, NULL);
@@ -1796,7 +1796,7 @@
   LmMessageHandler *handler;
   GError *error = NULL;
 
-  xmpp_disconnect();
+  xmpp_disconnect(NULL);
 
   servername  = settings_opt_get("server");
   userjid     = settings_opt_get("jid");
@@ -1976,7 +1976,7 @@
   lm_message_node_set_attribute(y, "ver", ver);
 }
 
-void xmpp_disconnect(void)
+void xmpp_disconnect(const char *message)
 {
   if (!lconnection)
     return;
@@ -1984,7 +1984,7 @@
     // Launch pre-disconnect internal hook
     hk_predisconnect();
     // Announce it to  everyone else
-    xmpp_setstatus(offline, NULL, "", FALSE);
+    xmpp_setstatus(offline, NULL, message, FALSE);
   }
   if (lm_connection_is_open(lconnection))
     lm_connection_close(lconnection, NULL);
diff -r 6d9f7b9e620d mcabber/mcabber/xmpp.h
--- a/mcabber/mcabber/xmpp.h	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabber/xmpp.h	Sat Nov 07 14:54:34 2015 +0200
@@ -38,7 +38,7 @@
 
 void xmpp_init(void); /* private */
 int  xmpp_connect(void);
-void xmpp_disconnect(void);
+void xmpp_disconnect(const char *message);
 gboolean xmpp_is_online(void);
 
 void xmpp_room_join(const char *room, const char *nickname, const char *passwd);
diff -r 6d9f7b9e620d mcabber/mcabberrc.example
--- a/mcabber/mcabberrc.example	Sat Nov 07 14:37:38 2015 +0200
+++ b/mcabber/mcabberrc.example	Sat Nov 07 14:54:34 2015 +0200
@@ -383,6 +383,9 @@
 #set message_notavail  = I'm not available
 #set message_away      = I'm away
 #
+# Default offline message will not be overridden by 'message'.
+#set message_offline = Bye!
+#
 # The auto-away message is only used when 'autoaway' is set.  The previous
 # message will be restored when leaving auto-away status.  If this message
 # isn't defined, the status message will stay unchanged.