Software /
code /
prosody
Changeset
5630:5f3c0b11aa88
mod_admin_telnet: Make the muc:create() command complain if the room already exists
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 May 2013 22:58:13 +0200 |
parents | 5628:ba5c2f6b799e |
children | 5631:78bc91f0d74b 5639:7a0e19e649b7 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sun May 26 16:01:09 2013 +0200 +++ b/plugins/mod_admin_telnet.lua Sun May 26 22:58:13 2013 +0200 @@ -922,6 +922,8 @@ function def_env.muc:create(room_jid) local room, host = check_muc(room_jid); + if not room then return nil, host end + if hosts[host].modules.muc.rooms[room_jid] then return nil, "Room exists already" end return hosts[host].modules.muc.create_room(room_jid); end