# HG changeset patch # User Kim Alvefur # Date 1369601893 -7200 # Node ID 5f3c0b11aa8879f03be782ac1f22660fdb2534cd # Parent ba5c2f6b799edc1895b456c6991bfb20413f37f0 mod_admin_telnet: Make the muc:create() command complain if the room already exists diff -r ba5c2f6b799e -r 5f3c0b11aa88 plugins/mod_admin_telnet.lua --- 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