Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 7477:f9e470026042
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Jul 2016 22:01:10 +0200 |
parent | 7359:a5a080c12c96 |
parent | 7474:701989ab904f |
child | 7640:279f348e9a92 |
comparison
equal
deleted
inserted
replaced
7467:9a73c85baffe | 7477:f9e470026042 |
---|---|
767 ); | 767 ); |
768 end | 768 end |
769 end | 769 end |
770 | 770 |
771 function def_env.s2s:showcert(domain) | 771 function def_env.s2s:showcert(domain) |
772 local ser = require "util.serialization".serialize; | |
773 local print = self.session.print; | 772 local print = self.session.print; |
774 local s2s_sessions = module:shared"/*/s2s/sessions"; | 773 local s2s_sessions = module:shared"/*/s2s/sessions"; |
775 local domain_sessions = set.new(array.collect(values(s2s_sessions))) | 774 local domain_sessions = set.new(array.collect(values(s2s_sessions))) |
776 /function(session) return (session.to_host == domain or session.from_host == domain) and session or nil; end; | 775 /function(session) return (session.to_host == domain or session.from_host == domain) and session or nil; end; |
777 local cert_set = {}; | 776 local cert_set = {}; |
992 end | 991 end |
993 return room_name, host; | 992 return room_name, host; |
994 end | 993 end |
995 | 994 |
996 function def_env.muc:create(room_jid) | 995 function def_env.muc:create(room_jid) |
997 local room, host = check_muc(room_jid); | 996 local room_name, host = check_muc(room_jid); |
998 if not room_name then | 997 if not room_name then |
999 return room_name, host; | 998 return room_name, host; |
1000 end | 999 end |
1001 if not room then return nil, host end | 1000 if not room_name then return nil, host end |
1002 if hosts[host].modules.muc.rooms[room_jid] then return nil, "Room exists already" end | 1001 if hosts[host].modules.muc.rooms[room_jid] then return nil, "Room exists already" end |
1003 return hosts[host].modules.muc.create_room(room_jid); | 1002 return hosts[host].modules.muc.create_room(room_jid); |
1004 end | 1003 end |
1005 | 1004 |
1006 function def_env.muc:room(room_jid) | 1005 function def_env.muc:room(room_jid) |