Changeset

679:dcddd9195098

mod_group_bookmarks: Log error when group_bookmarks_file not specified
author Matthew Wild <mwild1@gmail.com>
date Sat, 26 May 2012 22:53:39 +0100
parents 678:429be98872dc
children 680:a2cea070f2c7
files mod_group_bookmarks/mod_group_bookmarks.lua
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_group_bookmarks/mod_group_bookmarks.lua	Sat May 26 11:37:44 2012 +0000
+++ b/mod_group_bookmarks/mod_group_bookmarks.lua	Sat May 26 22:53:39 2012 +0100
@@ -75,11 +75,16 @@
 end, 1);
 
 function module.load()
-	bookmarks_file = config.get(module:get_host(), "core", "group_bookmarks_file");
-	if not bookmarks_file then return; end
-	
+	bookmarks_file = module:get_option_string("group_bookmarks_file");
+
 	rooms = { default = {} };
 	members = { };
+
+	if not bookmarks_file then
+		module:log("error", "Please specify group_bookmarks_file in your configuration");
+		return;
+	end
+	
 	local curr_room;
 	for line in io.lines(bookmarks_file) do
 		if line:match("^%s*%[.-%]%s*$") then