Software /
code /
prosody
Comparison
plugins/mod_muc.lua @ 1059:aed462ef09d8
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 |
parent | 965:8bc06338aac3 |
child | 1060:fb3b2de0eb2f |
comparison
equal
deleted
inserted
replaced
1053:c04b40a0740b | 1059:aed462ef09d8 |
---|---|
272 origin.send(st.error_reply(stanza, "cancel", "conflict")); | 272 origin.send(st.error_reply(stanza, "cancel", "conflict")); |
273 else | 273 else |
274 log("debug", "%s joining as %s", from, to); | 274 log("debug", "%s joining as %s", from, to); |
275 local data; | 275 local data; |
276 if not rooms:get(room) and not rooms_info:get(room) then -- new room | 276 if not rooms:get(room) and not rooms_info:get(room) then -- new room |
277 rooms_info:set(room, 'name', (jid_split(room))); | |
277 data = {affiliation='owner', role='moderator', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; | 278 data = {affiliation='owner', role='moderator', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; |
278 end | 279 end |
279 if not data then -- new occupant | 280 if not data then -- new occupant |
280 data = {affiliation='none', role='participant', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; | 281 data = {affiliation='none', role='participant', jid=from, sessions={[from]=get_filtered_presence(stanza)}}; |
281 end | 282 end |