Changeset

3506:0f46acca11cc

MUC: Fixed traceback on presence errors lacking a condition.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 27 Sep 2010 19:00:11 +0500
parents 3505:eb2f36dc0369
children 3509:72cb8b6536b9
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Sep 21 18:28:06 2010 +0500
+++ b/plugins/muc/muc.lib.lua	Mon Sep 27 19:00:11 2010 +0500
@@ -243,7 +243,7 @@
 
 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