comparison plugins/mod_muc.lua @ 1055:a970f691e42d

mod_muc: The default room name is the room node
author Waqas Hussain <waqas20@gmail.com>
date Fri, 24 Apr 2009 00:34:49 +0500
parents a3d77353c18a
children 09821f8ad319
comparison
equal deleted inserted replaced
1050:9552c08241af 1055:a970f691e42d
274 origin.send(st.error_reply(stanza, "cancel", "conflict")); 274 origin.send(st.error_reply(stanza, "cancel", "conflict"));
275 else 275 else
276 log("debug", "%s joining as %s", from, to); 276 log("debug", "%s joining as %s", from, to);
277 local data; 277 local data;
278 if not rooms:get(room) and not rooms_info:get(room) then -- new room 278 if not rooms:get(room) and not rooms_info:get(room) then -- new room
279 rooms_info:set(room, 'name', (jid_split(room)));
279 data = {affiliation='owner', role='moderator', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; 280 data = {affiliation='owner', role='moderator', jid=from, sessions={[from]=get_filtered_presence(stanza)}};
280 end 281 end
281 if not data then -- new occupant 282 if not data then -- new occupant
282 data = {affiliation='none', role='participant', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; 283 data = {affiliation='none', role='participant', jid=from, sessions={[from]=get_filtered_presence(stanza)}};
283 end 284 end