diff mcabber/src/settings.c @ 1141:5be2408a6534

Add option "max_history_blocks"
author Mikael Berthe <mikael@lilotux.net>
date Tue, 06 Feb 2007 00:21:42 +0100
parents b2fc694a8228
children 16abe7ec3056
line wrap: on
line diff
--- a/mcabber/src/settings.c	Sun Feb 04 18:49:47 2007 +0100
+++ b/mcabber/src/settings.c	Tue Feb 06 00:21:42 2007 +0100
@@ -428,4 +428,14 @@
   return NULL;
 }
 
+guint get_max_history_blocks(void)
+{
+  int max_num_of_blocks = settings_opt_get_int("max_history_blocks");
+  if (max_num_of_blocks < 0)
+    max_num_of_blocks = 0;
+  else if (max_num_of_blocks == 1)
+    max_num_of_blocks = 2;
+  return (guint)max_num_of_blocks;
+}
+
 /* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */