diff mcabber/src/main.c @ 1437:071c8170b7de

Add option 'statefile' to keep track of unread messages across restarts (Suggested by micressor)
author Mikael Berthe <mikael@lilotux.net>
date Mon, 25 Feb 2008 20:27:56 +0100
parents a64778f5f26b
children 00503a68f431
line wrap: on
line diff
--- a/mcabber/src/main.c	Sun Feb 24 17:46:13 2008 +0100
+++ b/mcabber/src/main.c	Mon Feb 25 20:27:56 2008 +0100
@@ -499,6 +499,9 @@
   fifo_init(settings_opt_get("fifo_name"));
 #endif
 
+  /* Load previous roster state */
+  hlog_load_state();
+
   if (ret < 0) {
     scr_LogPrint(LPRINT_NORMAL, "No configuration file has been found.");
     scr_ShowBuddyWindow();
@@ -539,10 +542,11 @@
 #endif
 #ifdef HAVE_ASPELL_H
   /* Deinitialize aspell */
-  if (settings_opt_get_int("aspell_enable")) {
+  if (settings_opt_get_int("aspell_enable"))
     spellcheck_deinit();
-  }
 #endif
+  /* Save pending message state */
+  hlog_save_state();
 
   printf("\n\nThanks for using mcabber!\n");