diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-02-20 00:51:33 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-02-20 00:51:33 +0500 |
commit | 1113fbdedd06e496c037a9449fd9136c0cbf58bb (patch) | |
tree | 0d169e4b1b8de2311be2260325c3250e5a1ac32b | |
parent | 412368f62ac29b4880f14c26372806a32b2bb4ae (diff) | |
download | prosody-1113fbdedd06e496c037a9449fd9136c0cbf58bb.tar.gz prosody-1113fbdedd06e496c037a9449fd9136c0cbf58bb.zip |
MUC: Throw an error if we try talking to ourselves
-rw-r--r-- | plugins/mod_muc.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_muc.lua b/plugins/mod_muc.lua index 5fa52726..e02ab00e 100644 --- a/plugins/mod_muc.lua +++ b/plugins/mod_muc.lua @@ -227,6 +227,7 @@ function handle_to_occupant(origin, stanza) -- PM, vCards, etc local current_nick = jid_nick:get(from, room); local type = stanza.attr.type; log("debug", "room: %s, current_nick: %s, stanza: %s", room or "nil", current_nick or "nil", stanza:top_tag()); + if (select(2, jid_split(from)) == muc_domain) error("Presence from the MUC itself!!!"); if stanza.name == "presence" then local pr = get_filtered_presence(stanza); pr.attr.from = current_nick; |