Allow custom network name
This commit is contained in:
commit
0f754ea703
@ -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": {
|
||||
|
@ -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
|
||||
});
|
||||
|
||||
|
@ -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})
|
||||
|
@ -2,6 +2,7 @@
|
||||
"user": "example",
|
||||
"password": "password",
|
||||
"networks": [{
|
||||
"name": "Rizon",
|
||||
"host": "irc.rizon.net",
|
||||
"port": 6667,
|
||||
"password": "serverpw"
|
||||
|
Loading…
Reference in New Issue
Block a user