--- ekg/docs/vars.txt	2006-08-09 08:39:56.000000000 +0200
+++ ekg_patched/docs/vars.txt	2006-10-13 00:11:05.000000000 +0200
@@ -980,5 +980,15 @@
 	znakiem ,,|''. jeśli okno nie ma przypisanej rozmowy, wpis jest
 	pusty. jeśli okno nie istnieje, wpis zawiera ,,-''.
 
+userlist_dumpnext
+        typ: liczba
+        domyślna wartość: 0
+
+        określa, czy listy kontaktów będą zapisywane do plików:
+        userlist.%pid w przypadku wystąpienia następujących zdarzeń:
+        dla 0 nie będą zapisywane, dla 1 będą zapisywane po dokonaniu
+        importu listy kontaktów na serwer, dla 2 będą zapisywane po
+        dokonaniu exportu listy kontaktów z serwera, dla 4 będą zapisywane
+        po dokonaniu exportu lub importu listy kontaktów z serwera.
 
 $Id: vars.txt,v 1.189 2006/08/09 06:39:56 embe Exp $
--- ekg/src/stuff.c	2006-09-26 04:30:27.000000000 +0200
+++ ekg_patched/src/stuff.c	2006-10-13 00:13:11.000000000 +0200
@@ -120,6 +120,7 @@
 char *config_sound_mail_file = NULL;
 char *config_sound_app = NULL;
 int config_uin = 0;
+int config_userlist_dumpnext = 0;
 int config_last_sysmsg = 0;
 int config_last_sysmsg_changed = 0;
 char *config_local_ip = NULL;
--- ekg/src/stuff.h	2006-09-26 04:30:27.000000000 +0200
+++ ekg_patched/src/stuff.h	2006-10-13 00:12:49.000000000 +0200
@@ -335,6 +335,7 @@
 char *config_datestamp;
 char *config_timestamp;
 int config_uin;
+int config_userlist_dumpnext;
 char *config_windows_layout;
 int config_windows_save;
 #ifdef WITH_WAP
--- ekg/src/events.c	2006-09-26 04:30:26.000000000 +0200
+++ ekg_patched/src/events.c	2006-10-13 00:14:44.000000000 +0200
@@ -2089,7 +2089,11 @@
 		case GG_USERLIST_GET_REPLY:
 		{
 			if (!userlist_get_config)
+			{
 				print("userlist_get_ok");
+				if ((config_userlist_dumpnext) == 2 || (config_userlist_dumpnext == 4 ))
+					userlist_write_crash();
+			}
 			else
 				print("userlist_config_get_ok");
 			
@@ -2126,6 +2130,8 @@
 			switch (userlist_put_config) {
 				case 0:
 					print("userlist_put_ok");
+					if ((config_userlist_dumpnext) == 1 || (config_userlist_dumpnext == 4 ))
+						userlist_write_crash();
 					break;
 				case 1:
 					print("userlist_config_put_ok");
--- ekg/src/vars.c	2006-08-03 06:36:35.000000000 +0200
+++ ekg_patched/src/vars.c	2006-10-13 00:22:41.000000000 +0200
@@ -306,6 +306,7 @@
 	variable_add("statusbar_fgcolor", "sF", VAR_INT, 2, NULL, NULL, NULL, NULL);
 	variable_add("statusbar_bgcolor", "sB", VAR_INT, 2, NULL, NULL, NULL, NULL);
 #endif
+	variable_add("userlist_dumpnext", "ud", VAR_MAP, 1, &config_userlist_dumpnext, NULL, variable_map(4, 0, 0, "none", 1, 2, "import", 2, 1, "export", 4, 0, "all"), NULL);
 	variable_add("tab_command", "tc", VAR_STR, 1, &config_tab_command, NULL, NULL, NULL);
 	variable_add("theme", "th", VAR_STR, 1, &config_theme, changed_theme, NULL, NULL);
 	variable_add("time_deviation", "td", VAR_INT, 1, &config_time_deviation, NULL, NULL, NULL);
