/usr/share/doc/node-node-xmpp/examples/echo_server.js is in node-node-xmpp 0.3.2-3build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 | var xmpp = require('../lib/node-xmpp');
var r = new xmpp.Router();
r.register('codetu.be', function(stanza) {
console.log("<< "+stanza.toString());
if (stanza.attrs.type !== 'error') {
var me = stanza.attrs.to;
stanza.attrs.to = stanza.attrs.from;
stanza.attrs.from = me;
r.send(stanza);
}
});
|