Allow custom network name

This commit is contained in:
Mattias Erming 2014-09-09 15:11:51 -07:00
commit 0f754ea703
4 changed files with 6 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.19.0",
"version": "0.20.0",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {

View file

@ -88,7 +88,7 @@ Client.prototype.find = function(id) {
Client.prototype.connect = function(args) {
var client = this;
var server = _.defaults(_.pick(args, ['host', 'port', 'rejectUnauthorized']), {
var server = _.defaults(_.pick(args, ['host', 'port', 'rejectUnauthorized', 'name']), {
host: "irc.freenode.org",
port: 6667,
rejectUnauthorized: true
@ -114,6 +114,7 @@ Client.prototype.connect = function(args) {
var network = new Network({
host: server.host,
name: server.name,
irc: irc
});

View file

@ -11,8 +11,8 @@ function Network(attr) {
connected: false,
host: "",
id: id++,
irc: null,
name: prettify(attr.host)
name: prettify(attr.host),
irc: null
}, attr));
this.channels.unshift(
new Chan({name: this.name, type: Chan.Type.LOBBY})

View file

@ -2,6 +2,7 @@
"user": "example",
"password": "password",
"networks": [{
"name": "Rizon",
"host": "irc.rizon.net",
"port": 6667,
"password": "serverpw"