Software /
code /
prosody-modules
Comparison
mod_conformance_restricted/mod_conformance_restricted.lua @ 1343:7dbde05b48a9
all the things: Remove trailing whitespace
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Tue, 11 Mar 2014 18:44:01 +0100 |
parent | 699:7c88e09a07e7 |
comparison
equal
deleted
inserted
replaced
1342:0ae065453dc9 | 1343:7dbde05b48a9 |
---|---|
1 -- Prosody IM | 1 -- Prosody IM |
2 -- Copyright (C) 2012 Florian Zeitz | 2 -- Copyright (C) 2012 Florian Zeitz |
3 -- | 3 -- |
4 -- This project is MIT/X11 licensed. Please see the | 4 -- This project is MIT/X11 licensed. Please see the |
5 -- COPYING file in the source package for more information. | 5 -- COPYING file in the source package for more information. |
6 -- | 6 -- |
7 | 7 |
8 local st = require "util.stanza"; | 8 local st = require "util.stanza"; |
10 | 10 |
11 module:hook("message/host", function (event) | 11 module:hook("message/host", function (event) |
12 local origin, stanza = event.origin, event.stanza; | 12 local origin, stanza = event.origin, event.stanza; |
13 local node, host, resource = jid.split(stanza.attr.to); | 13 local node, host, resource = jid.split(stanza.attr.to); |
14 local body = stanza:get_child_text("body"); | 14 local body = stanza:get_child_text("body"); |
15 | 15 |
16 if resource ~= "conformance" then | 16 if resource ~= "conformance" then |
17 return; -- Not interop testing | 17 return; -- Not interop testing |
18 end | 18 end |
19 | 19 |
20 if body == "PI" then | 20 if body == "PI" then |
28 else | 28 else |
29 local reply = st.reply(stanza); | 29 local reply = st.reply(stanza); |
30 reply:body("Send me one of: PI, comment, DTD, or entity"); | 30 reply:body("Send me one of: PI, comment, DTD, or entity"); |
31 origin.send(reply); | 31 origin.send(reply); |
32 end | 32 end |
33 | 33 |
34 return true; | 34 return true; |
35 end); | 35 end); |