Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 7640:279f348e9a92
mod_admin_telnet: Fix to use modern way to fetch a MUC room
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Aug 2016 17:53:57 +0200 |
parent | 7477:f9e470026042 |
child | 7723:488fddf88ffd |
comparison
equal
deleted
inserted
replaced
7639:eab307f7435c | 7640:279f348e9a92 |
---|---|
996 local room_name, host = check_muc(room_jid); | 996 local room_name, host = check_muc(room_jid); |
997 if not room_name then | 997 if not room_name then |
998 return room_name, host; | 998 return room_name, host; |
999 end | 999 end |
1000 if not room_name then return nil, host end | 1000 if not room_name then return nil, host end |
1001 if hosts[host].modules.muc.rooms[room_jid] then return nil, "Room exists already" end | 1001 if hosts[host].modules.muc.get_room_from_jid(room_jid) then return nil, "Room exists already" end |
1002 return hosts[host].modules.muc.create_room(room_jid); | 1002 return hosts[host].modules.muc.create_room(room_jid); |
1003 end | 1003 end |
1004 | 1004 |
1005 function def_env.muc:room(room_jid) | 1005 function def_env.muc:room(room_jid) |
1006 local room_name, host = check_muc(room_jid); | 1006 local room_name, host = check_muc(room_jid); |