Mercurial > psgxs
diff psgxs.js @ 43:023f767662d3
Fix compatibility with strict mode of node 0.4 and some files without licence header.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 01 Mar 2011 11:58:15 +0100 |
parents | 6697f394301f |
children | 3e0ca96d2dce |
line wrap: on
line diff
--- a/psgxs.js +++ b/psgxs.js @@ -19,6 +19,8 @@ * along with PSĜS. If not, see <http://www.gnu.org/licenses/>. */ +'use strict'; + var xmpp = require('xmpp'); var sha1 = require('sha1'); require('./iso8601'); @@ -45,13 +47,13 @@ conn.log = function (_, m) { console.log function _(obj, color) { var str = require('sys').inspect(obj, false, null); if (color) - console.log('\033['+c+';1m' + str + '\033[0m'); + console.log('\x1b['+c+';1m' + str + '\x1b[0m'); else console.log(str); }; process.addListener('uncaughtException', function (err) { - console.log('\033[41;1mUncaught exception (' + err + '), this should never happen:\033[0m\n' + err.stack); + console.log('\x1b[41;1mUncaught exception (' + err + '), this should never happen:\x1b[0m\n' + err.stack); }); if (typeof xmpp.StanzaBuilder.cnode != 'function' || typeof xmpp.StanzaBuilder.prototype.cnode != 'function') {