Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 6141:bf6de8ef66c2
plugins/muc: Rename admin query hook
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Thu, 27 Mar 2014 18:09:42 -0400 |
parent | 6140:e4cdb3e5d7d0 |
child | 6142:a6e526c00e6e |
comparison
equal
deleted
inserted
replaced
6140:e4cdb3e5d7d0 | 6141:bf6de8ef66c2 |
---|---|
898 function room_mt:handle_disco_items_get_query(origin, stanza) | 898 function room_mt:handle_disco_items_get_query(origin, stanza) |
899 origin.send(self:get_disco_items(stanza)); | 899 origin.send(self:get_disco_items(stanza)); |
900 return true; | 900 return true; |
901 end | 901 end |
902 | 902 |
903 function room_mt:handle_admin_item_set_command(origin, stanza) | 903 function room_mt:handle_admin_query_set_command(origin, stanza) |
904 local item = stanza.tags[1].tags[1]; | 904 local item = stanza.tags[1].tags[1]; |
905 if item.attr.jid then -- Validate provided JID | 905 if item.attr.jid then -- Validate provided JID |
906 item.attr.jid = jid_prep(item.attr.jid); | 906 item.attr.jid = jid_prep(item.attr.jid); |
907 if not item.attr.jid then | 907 if not item.attr.jid then |
908 origin.send(st.error_reply(stanza, "modify", "jid-malformed")); | 908 origin.send(st.error_reply(stanza, "modify", "jid-malformed")); |
931 origin.send(st.error_reply(stanza, "cancel", "bad-request")); | 931 origin.send(st.error_reply(stanza, "cancel", "bad-request")); |
932 return true; | 932 return true; |
933 end | 933 end |
934 end | 934 end |
935 | 935 |
936 function room_mt:handle_admin_item_get_command(origin, stanza) | 936 function room_mt:handle_admin_query_get_command(origin, stanza) |
937 local actor = stanza.attr.from; | 937 local actor = stanza.attr.from; |
938 local affiliation = self:get_affiliation(actor); | 938 local affiliation = self:get_affiliation(actor); |
939 local item = stanza.tags[1].tags[1]; | 939 local item = stanza.tags[1].tags[1]; |
940 local _aff = item.attr.affiliation; | 940 local _aff = item.attr.affiliation; |
941 local _rol = item.attr.role; | 941 local _rol = item.attr.role; |