Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

whitespace fixes and document nossl flag

  • Loading branch information...
commit c8f48efb79c2b388c6c9c574f2b0129dab520c6d 1 parent aa93b4d
@kkaefer authored
View
5 README.md
@@ -1,6 +1,6 @@
**medium** is a IRC to Jabber Multi-user-chat gateway. It is designed to allow you to use your IRC client to participate in Jabber MUC rooms ("groupchat"). One-to-one chat to users in the Jabber MUC room is also possible. Regular Jabber messages to regular users and a roster is not supported.
-It *exclusively* supports encrypted connections, both to the Jabber server and to the IRC client. It also expects the IRC client to support UTF-8 encoded room names, nicknames etc.
+It *exclusively* supports encrypted connections, both to the Jabber server and to the IRC client. It also expects the IRC client to support UTF-8 encoded room names, nicknames etc.
This code is still in alpha; there is barely any error handling and sometimes the gateway crashes when it encounters an unimplemented feature.
@@ -16,4 +16,5 @@ Medium can only act as a gateway to one Jabber server at a time. The configurati
* `xmpp.host`: The domain of the Jabber server
* `xmpp.jid`: The host part of the Jabber ID for connecting users. This is required for some servers where the `host` does not match the `jid`, e.g. Google Talk.
* `xmpp.muc`: The conference server.
-* `xmpp.port`: Port for XMPP connection. Defaults to 5222.
+* `xmpp.port`: Port for XMPP connection. Defaults to 5222.
+* `xmpp.noSSL`: If set to `true`, the gateway will connect to a Jabber server without SSL.
View
4 config.js
@@ -1,10 +1,6 @@
exports.debug = true;
exports.xmpp = {
- // host: 'jabber.org',
- // jid: 'jabber.org',
- // muc: 'conference.jabber.org'
-
host: 'localhost',
jid: 'localhost',
muc: 'conference.localhost',
View
2  lib/helper.js
@@ -1,6 +1,6 @@
exports.xml = {
$escapes: {'<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&apos;', '&': '&amp;' },
- $escape: function(str) {
+ $escape: function(str) {
return str.replace(/[<>"'&]/g, function(c) {
return c in exports.xml.$escapes ? exports.xml.$escapes[c] : c;
});
View
4 lib/ircd.js
@@ -60,7 +60,7 @@ Connection.prototype.setup = function() {
}
}
});
-
+
this.stream.on('end', function() { connection.emit('end'); });
this.stream.on('close', function() { connection.emit('close'); });
};
@@ -114,7 +114,7 @@ Connection.prototype.JOIN = function(line) {
// Discard optional password.
var channel = line.split(' ', 1)[0];
var rest = line.substring(channel.length + 1);
-
+
var channels = channel.split(',');
for (var i = 0; i < channels.length; i++) {
this.emit('join', channels[i], rest);
View
2  medium.js
@@ -141,7 +141,7 @@ ircd.createServer(config.irc, function (irc) {
if (!irc.quit) {
irc.quit = true;
irc.end();
-
+
if (!jabber.quit) {
// Leave all rooms.
for (var name in rooms) {
Please sign in to comment.
Something went wrong with that request. Please try again.