From c1bf0e726b24d2dfa856d2ca78c602619cc1e839 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 27 Sep 2010 19:00:11 +0500 Subject: MUC: Fixed traceback on presence errors lacking a condition. --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 32d539e7..eddfcd9f 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -243,7 +243,7 @@ end local function build_unavailable_presence_from_error(stanza) local type, condition, text = stanza:get_error(); - local error_message = "Kicked: "..condition:gsub("%-", " "); + local error_message = "Kicked: "..(condition and condition:gsub("%-", " ") or "presence error"); if text then error_message = error_message..": "..text; end -- cgit v1.2.3