examples/mcabberrc.lua
changeset 84 c0db7efde255
parent 77 8a7f7829f4df
child 99 ed4676536ed9
--- a/examples/mcabberrc.lua	Fri Oct 23 13:14:19 2009 +0300
+++ b/examples/mcabberrc.lua	Wed Nov 25 14:00:12 2009 +0200
@@ -224,9 +224,11 @@
 -- - hook-start
 -- - hook-quit
 function hook_handler ( args )
-	for mod, cb in pairs ( hooks_d[args.hook] ) do
-		if cb then
-			cb ( args )
+	if [hooks_d[args.hook] then
+		for mod, cb in pairs ( hooks_d[args.hook] ) do
+			if cb then
+				cb ( args )
+			end
 		end
 	end
 end