--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/add-offline-message.diff Wed Aug 01 00:22:13 2012 +0300
@@ -0,0 +1,331 @@
+# HG changeset patch
+# Parent 26edaf6ea10b8db2ed07da3e4ad9bee03077de84
+
+diff -r 26edaf6ea10b mcabber/ChangeLog.api
+--- a/mcabber/ChangeLog.api Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/ChangeLog.api Wed Aug 01 00:21:32 2012 +0300
+@@ -1,3 +1,9 @@
++dev (24)
++ * experimental patch add-offline-message
++ * xmpp_disconnect now accepts status message
++
++ -- Myhailo Danylenko, 2012-07-31
++
+ dev (23)
+ * Changeset 8dc418af3e72
+ Add buddy_(get|set)activeresource() functions
+diff -r 26edaf6ea10b mcabber/doc/help/cs/hlp_disconnect.txt
+--- a/mcabber/doc/help/cs/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/cs/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/de/hlp_disconnect.txt
+--- a/mcabber/doc/help/de/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/de/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/en/hlp_disconnect.txt
+--- a/mcabber/doc/help/en/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/en/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/fr/hlp_disconnect.txt
+--- a/mcabber/doc/help/fr/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/fr/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/it/hlp_disconnect.txt
+--- a/mcabber/doc/help/it/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/it/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/nl/hlp_disconnect.txt
+--- a/mcabber/doc/help/nl/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/nl/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/pl/hlp_disconnect.txt
+--- a/mcabber/doc/help/pl/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/pl/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/ru/hlp_disconnect.txt
+--- a/mcabber/doc/help/ru/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/ru/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -1,5 +1,6 @@
+
+- /DISCONNECT
++ /DISCONNECT [сообщение]
+
+ Завершает соединение с Jabber-сервером.
++Вы можете указать сообщение статуса при выходе.
+ Примечание: список контактов доступен только когда соединение с сервером активно, поэтому список контактов пуст при завершении соединения.
+diff -r 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/doc/help/uk/hlp_disconnect.txt
+--- a/mcabber/doc/help/uk/hlp_disconnect.txt Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/doc/help/uk/hlp_disconnect.txt Wed Aug 01 00:21:32 2012 +0300
+@@ -1,5 +1,6 @@
+
+- /DISCONNECT
++ /DISCONNECT [повідомлення]
+
+ Розірвати з'єднання з сервером.
++Ви можете вказати повідомлення статусу відсутності.
+ Майте на увазі, що список контактів зберігається на сервері, отож після від'єднання ви його більше не побачите.
+diff -r 26edaf6ea10b 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 Wed Aug 01 00:21:32 2012 +0300
+@@ -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 26edaf6ea10b mcabber/mcabber/api.h
+--- a/mcabber/mcabber/api.h Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/mcabber/api.h Wed Aug 01 00:21:32 2012 +0300
+@@ -3,8 +3,8 @@
+
+ #include <mcabber/config.h> // For MCABBER_BRANCH
+
+-#define MCABBER_API_VERSION 23
+-#define MCABBER_API_MIN 21
++#define MCABBER_API_VERSION 24
++#define MCABBER_API_MIN 24
+
+ #define MCABBER_BRANCH_DEV 1
+
+diff -r 26edaf6ea10b mcabber/mcabber/commands.c
+--- a/mcabber/mcabber/commands.c Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/mcabber/commands.c Wed Aug 01 00:21:32 2012 +0300
+@@ -94,6 +94,7 @@
+ static void do_otrpolicy(char *arg);
+ static void do_echo(char *arg);
+ static void do_module(char *arg);
++static void do_exit(char *arg);
+
+ static void room_bookmark(gpointer bud, char *arg);
+
+@@ -199,6 +200,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);
+@@ -4120,7 +4122,11 @@
+
+ static void do_disconnect(char *arg)
+ {
+- xmpp_disconnect();
++ char *message = NULL;
++ if (arg)
++ message = to_utf8(arg);
++ xmpp_disconnect(message);
++ g_free(message);
+ }
+
+ static void do_help(char *arg)
+@@ -4134,4 +4140,14 @@
+ scr_print_logwindow(arg);
+ }
+
++static void do_exit(char *arg)
++{
++ if (arg && xmpp_is_online()) { // XXX should we always disconnect?
++ char *message = to_utf8(arg);
++ xmpp_disconnect(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 26edaf6ea10b mcabber/mcabber/main.c
+--- a/mcabber/mcabber/main.c Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/mcabber/main.c Wed Aug 01 00:21:32 2012 +0300
+@@ -83,7 +83,7 @@
+ #ifndef MODULES_ENABLE
+ fifo_deinit();
+ #endif
+- xmpp_disconnect();
++ xmpp_disconnect(NULL);
+ scr_terminate_curses();
+
+ // Restore term settings, if needed.
+@@ -512,7 +512,7 @@
+ #ifdef HAVE_LIBOTR
+ otr_terminate();
+ #endif
+- xmpp_disconnect();
++ xmpp_disconnect(NULL);
+ #ifdef HAVE_GPGME
+ gpg_terminate();
+ #endif
+diff -r 26edaf6ea10b mcabber/mcabber/xmpp.c
+--- a/mcabber/mcabber/xmpp.c Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/mcabber/xmpp.c Wed Aug 01 00:21:32 2012 +0300
+@@ -892,7 +892,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);
+@@ -1801,7 +1801,7 @@
+ LmMessageHandler *handler;
+ GError *error = NULL;
+
+- xmpp_disconnect();
++ xmpp_disconnect(NULL);
+
+ servername = settings_opt_get("server");
+ userjid = settings_opt_get("jid");
+@@ -1975,7 +1975,7 @@
+ lm_message_node_set_attribute(y, "ver", ver);
+ }
+
+-void xmpp_disconnect(void)
++void xmpp_disconnect(const char *message)
+ {
+ if (!lconnection)
+ return;
+@@ -1983,7 +1983,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 26edaf6ea10b mcabber/mcabber/xmpp.h
+--- a/mcabber/mcabber/xmpp.h Mon Jul 30 22:39:17 2012 +0200
++++ b/mcabber/mcabber/xmpp.h Wed Aug 01 00:21:32 2012 +0300
+@@ -35,7 +35,7 @@
+ extern LmSSL* lssl;
+
+ 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);
--- a/guard-xmpp-password.diff Sat Jul 28 22:38:18 2012 +0300
+++ b/guard-xmpp-password.diff Wed Aug 01 00:22:13 2012 +0300
@@ -4,10 +4,10 @@
restricted data, better store restricted data somewhere else
* add xmpp_init() and xmpp_have_password (non-api)
-diff -r c290165bc534 mcabber/mcabber/commands.c
---- a/mcabber/mcabber/commands.c Mon Apr 30 23:37:25 2012 +0300
-+++ b/mcabber/mcabber/commands.c Mon Apr 30 23:38:20 2012 +0300
-@@ -2272,10 +2272,8 @@
+diff -r f383a4ded11f mcabber/mcabber/commands.c
+--- a/mcabber/mcabber/commands.c Wed Aug 01 00:02:59 2012 +0300
++++ b/mcabber/mcabber/commands.c Wed Aug 01 00:03:06 2012 +0300
+@@ -2275,10 +2275,8 @@
static void list_option_cb(char *k, char *v, void *f)
{
@@ -20,9 +20,9 @@
}
static void do_set(char *arg)
-diff -r c290165bc534 mcabber/mcabber/main.c
---- a/mcabber/mcabber/main.c Mon Apr 30 23:37:25 2012 +0300
-+++ b/mcabber/mcabber/main.c Mon Apr 30 23:38:20 2012 +0300
+diff -r f383a4ded11f mcabber/mcabber/main.c
+--- a/mcabber/mcabber/main.c Wed Aug 01 00:02:59 2012 +0300
++++ b/mcabber/mcabber/main.c Wed Aug 01 00:03:06 2012 +0300
@@ -381,6 +381,7 @@
scr_init_locale_charset();
ut_init_debug();
@@ -42,9 +42,9 @@
settings_set(SETTINGS_TYPE_OPTION, "password", pwd);
g_free(pwd);
}
-diff -r c290165bc534 mcabber/mcabber/xmpp.c
---- a/mcabber/mcabber/xmpp.c Mon Apr 30 23:37:25 2012 +0300
-+++ b/mcabber/mcabber/xmpp.c Mon Apr 30 23:38:20 2012 +0300
+diff -r f383a4ded11f mcabber/mcabber/xmpp.c
+--- a/mcabber/mcabber/xmpp.c Wed Aug 01 00:02:59 2012 +0300
++++ b/mcabber/mcabber/xmpp.c Wed Aug 01 00:03:06 2012 +0300
@@ -23,6 +23,8 @@
*/
#include <stdlib.h>
@@ -139,9 +139,9 @@
scr_LogPrint(LPRINT_LOGNORM, "Your password has not been specified!");
return -1;
}
-diff -r c290165bc534 mcabber/mcabber/xmpp.h
---- a/mcabber/mcabber/xmpp.h Mon Apr 30 23:37:25 2012 +0300
-+++ b/mcabber/mcabber/xmpp.h Mon Apr 30 23:38:20 2012 +0300
+diff -r f383a4ded11f mcabber/mcabber/xmpp.h
+--- a/mcabber/mcabber/xmpp.h Wed Aug 01 00:02:59 2012 +0300
++++ b/mcabber/mcabber/xmpp.h Wed Aug 01 00:03:06 2012 +0300
@@ -33,7 +33,9 @@
extern LmConnection* lconnection;
@@ -150,5 +150,5 @@
+void xmpp_init(void); /* private */
int xmpp_connect(void);
- void xmpp_disconnect(void);
+ void xmpp_disconnect(const char *message);
gboolean xmpp_is_online(void);
--- a/switch-to-experimental.diff Sat Jul 28 22:38:18 2012 +0300
+++ b/switch-to-experimental.diff Wed Aug 01 00:22:13 2012 +0300
@@ -1,23 +1,23 @@
[local] Switch to experimental branch and api version
-diff -r bd387d7410d0 mcabber/ChangeLog.api
---- a/mcabber/ChangeLog.api Mon Apr 30 23:21:22 2012 +0300
-+++ b/mcabber/ChangeLog.api Mon Apr 30 23:36:31 2012 +0300
+diff -r 4eb2d00128c5 mcabber/ChangeLog.api
+--- a/mcabber/ChangeLog.api Tue Jul 31 23:59:24 2012 +0300
++++ b/mcabber/ChangeLog.api Wed Aug 01 00:02:04 2012 +0300
@@ -1,3 +1,13 @@
+
-+experimental (35)
++experimental (36)
+
+ * Change branch to "experimental".
-+ * Api as defined by dev:23
++ * Api as defined by dev:24
+ * Add MCABBER_BRANCH_EXPERIMENTAL define to api.h
+ * MQ Patch: switch-to-experimental
+
+ -- Myhailo Danylenko, 2012-04-30
+
- dev (23)
- * Changeset 8dc418af3e72
- Add buddy_(get|set)activeresource() functions
-@@ -16,6 +26,12 @@
+ dev (24)
+ * experimental patch add-offline-message
+ * xmpp_disconnect now accepts status message
+@@ -22,6 +32,12 @@
-- Hermitifier, 2011-10-03
@@ -30,9 +30,9 @@
dev (20)
* Add cmd_set_safe() and cmd_is_safe()
-diff -r bd387d7410d0 mcabber/configure.ac
---- a/mcabber/configure.ac Mon Apr 30 23:21:22 2012 +0300
-+++ b/mcabber/configure.ac Mon Apr 30 23:36:31 2012 +0300
+diff -r 4eb2d00128c5 mcabber/configure.ac
+--- a/mcabber/configure.ac Tue Jul 31 23:59:24 2012 +0300
++++ b/mcabber/configure.ac Wed Aug 01 00:02:04 2012 +0300
@@ -272,7 +272,7 @@
AM_CONDITIONAL([INSTALL_HEADERS], [test x$enable_modules != xno])
@@ -42,17 +42,17 @@
AC_DEFINE([MCABBER_VERSION], "AC_PACKAGE_VERSION", [Mcabber version string])
# We need _GNU_SOURCE for strptime() and strcasestr()
-diff -r bd387d7410d0 mcabber/mcabber/api.h
---- a/mcabber/mcabber/api.h Mon Apr 30 23:21:22 2012 +0300
-+++ b/mcabber/mcabber/api.h Mon Apr 30 23:36:31 2012 +0300
+diff -r 4eb2d00128c5 mcabber/mcabber/api.h
+--- a/mcabber/mcabber/api.h Tue Jul 31 23:59:24 2012 +0300
++++ b/mcabber/mcabber/api.h Wed Aug 01 00:02:04 2012 +0300
@@ -3,10 +3,10 @@
#include <mcabber/config.h> // For MCABBER_BRANCH
--#define MCABBER_API_VERSION 23
--#define MCABBER_API_MIN 21
-+#define MCABBER_API_VERSION 35
-+#define MCABBER_API_MIN 35
+-#define MCABBER_API_VERSION 24
+-#define MCABBER_API_MIN 24
++#define MCABBER_API_VERSION 36
++#define MCABBER_API_MIN 36
-#define MCABBER_BRANCH_DEV 1
+#define MCABBER_BRANCH_EXPERIMENTAL 1