Mercurial > psgxs
annotate fdsq.js @ 57:addbf6bbfaa8
Various fixes for the migration to ltx.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 12 Sep 2011 23:45:00 +0200 |
parents | 99bd1d1ac071 |
children |
rev | line source |
---|---|
36
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 /* |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 * Copyright (C) 2010 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 * |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 * This file is part of PSĜS, a PubSub server written in JavaScript. |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 * |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 * PSĜS is free software: you can redistribute it and/or modify |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 * it under the terms of the GNU Affero General Public License as |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 * published by the Free Software Foundation, either version 3 of the |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 * License. |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 * |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
11 * PSĜS is distributed in the hope that it will be useful, |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 * GNU Affero General Public License for more details. |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 * |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Affero General Public License |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 * along with PSĜS. If not, see <http://www.gnu.org/licenses/>. |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 */ |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 |
43
023f767662d3
Fix compatibility with strict mode of node 0.4 and some files without licence header.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
36
diff
changeset
|
20 'use strict'; |
023f767662d3
Fix compatibility with strict mode of node 0.4 and some files without licence header.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
36
diff
changeset
|
21 |
56
99bd1d1ac071
Migration to node-xmpp, done!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
47
diff
changeset
|
22 var JID = require('node-xmpp').JID; |
36
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 var fdsq = exports; |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 |
47
0d3f18bb1d36
Remove usage of fdsq.js in modules.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
43
diff
changeset
|
26 fdsq.toBare = function(jid) { |
56
99bd1d1ac071
Migration to node-xmpp, done!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
47
diff
changeset
|
27 return new JID(jid).bare().toString(); |
36
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 }; |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
29 |
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
30 fdsq.toResource = function(jid) { |
56
99bd1d1ac071
Migration to node-xmpp, done!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
47
diff
changeset
|
31 return new JID(jid).resource; |
36
26eb015a7c40
Really should learn that “hg addremove” is good.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
32 }; |