changeset 731:15a8b717597b

mod_compat_muc_admin: added missing import (thanke MattJ)
author Marco Cirillo <maranda@lightwitch.org>
date Sat, 30 Jun 2012 23:01:29 +0000
parents 274bb1a96122
children 317e142fe6f1
files mod_compat_muc_admin/mod_compat_muc_admin.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_compat_muc_admin/mod_compat_muc_admin.lua	Thu Jun 28 05:24:26 2012 +0200
+++ b/mod_compat_muc_admin/mod_compat_muc_admin.lua	Sat Jun 30 23:01:29 2012 +0000
@@ -23,6 +23,10 @@
 	["service-unavailable"] = true;
 	["malformed error"] = true;
 };
+local function get_error_condition(stanza)
+	local _, condition = stanza:get_error();
+ 	return condition or "malformed error";
+end
 local function is_kickable_error(stanza)
 	local cond = get_error_condition(stanza);
 	return kickable_error_conditions[cond] and cond;