Comparison

plugins/muc/muc.lib.lua @ 6831:428b8da1cfce

MUC: Break a very long line
author Kim Alvefur <zash@zash.se>
date Sat, 12 Sep 2015 18:52:39 +0200
parent 6054:7a5ddbaf758d
child 6835:3afb8aa78069
child 6924:c37ad3e1fdd9
comparison
equal deleted inserted replaced
6830:e08f5d081a6c 6831:428b8da1cfce
673 if not form then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); return; end 673 if not form then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); return; end
674 if form.attr.type == "cancel" then origin.send(st.reply(stanza)); return; end 674 if form.attr.type == "cancel" then origin.send(st.reply(stanza)); return; end
675 if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Not a submitted form")); return; end 675 if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Not a submitted form")); return; end
676 676
677 local fields = self:get_form_layout(stanza.attr.from):data(form); 677 local fields = self:get_form_layout(stanza.attr.from):data(form);
678 if fields.FORM_TYPE ~= "http://jabber.org/protocol/muc#roomconfig" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration")); return; end 678 if fields.FORM_TYPE ~= "http://jabber.org/protocol/muc#roomconfig" then
679 679 origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration"));
680 return;
681 end
680 682
681 local changed = {}; 683 local changed = {};
682 684
683 local function handle_option(name, field, allowed) 685 local function handle_option(name, field, allowed)
684 local new = fields[field]; 686 local new = fields[field];