projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6702dfa
)
mod_admin_telnet: Make the muc:create() command complain if the room already exists
author
Kim Alvefur
<zash@zash.se>
Sun, 26 May 2013 20:58:13 +0000
(22:58 +0200)
committer
Kim Alvefur
<zash@zash.se>
Sun, 26 May 2013 20:58:13 +0000
(22:58 +0200)
plugins/mod_admin_telnet.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_admin_telnet.lua
b/plugins/mod_admin_telnet.lua
index 3d149623344be871187824eb836bad493cc0094c..d8dd995121b675f0155dfb3fa9479ebe187b308a 100644
(file)
--- a/
plugins/mod_admin_telnet.lua
+++ b/
plugins/mod_admin_telnet.lua
@@
-922,6
+922,8
@@
end
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