260 end |
260 end |
261 end |
261 end |
262 elseif type ~= 'result' then -- bad type |
262 elseif type ~= 'result' then -- bad type |
263 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? |
263 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? |
264 end |
264 end |
265 elseif not current_nick and type ~= "error" then -- not in room |
265 elseif not current_nick and type ~= "error" and type ~= "result" then -- not in room |
266 origin.send(st.error_reply(stanza, "cancel", "not-acceptable")); |
266 origin.send(st.error_reply(stanza, "cancel", "not-acceptable")); |
267 elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM |
267 elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM |
268 origin.send(st.error_reply(stanza, "modify", "bad-request")); |
268 origin.send(st.error_reply(stanza, "modify", "bad-request")); |
269 elseif stanza.name == "message" and type == "error" and get_kickable_error(stanza) then |
269 elseif stanza.name == "message" and type == "error" and get_kickable_error(stanza) then |
270 log("debug", "%s kicked from %s for sending an error message", current_nick, room); |
270 log("debug", "%s kicked from %s for sending an error message", current_nick, room); |