Allow custom network name
This commit is contained in:
commit
0f754ea703
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "A web IRC client",
|
"description": "A web IRC client",
|
||||||
"version": "0.19.0",
|
"version": "0.20.0",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -88,7 +88,7 @@ Client.prototype.find = function(id) {
|
|||||||
|
|
||||||
Client.prototype.connect = function(args) {
|
Client.prototype.connect = function(args) {
|
||||||
var client = this;
|
var client = this;
|
||||||
var server = _.defaults(_.pick(args, ['host', 'port', 'rejectUnauthorized']), {
|
var server = _.defaults(_.pick(args, ['host', 'port', 'rejectUnauthorized', 'name']), {
|
||||||
host: "irc.freenode.org",
|
host: "irc.freenode.org",
|
||||||
port: 6667,
|
port: 6667,
|
||||||
rejectUnauthorized: true
|
rejectUnauthorized: true
|
||||||
@ -114,6 +114,7 @@ Client.prototype.connect = function(args) {
|
|||||||
|
|
||||||
var network = new Network({
|
var network = new Network({
|
||||||
host: server.host,
|
host: server.host,
|
||||||
|
name: server.name,
|
||||||
irc: irc
|
irc: irc
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ function Network(attr) {
|
|||||||
connected: false,
|
connected: false,
|
||||||
host: "",
|
host: "",
|
||||||
id: id++,
|
id: id++,
|
||||||
irc: null,
|
name: prettify(attr.host),
|
||||||
name: prettify(attr.host)
|
irc: null
|
||||||
}, attr));
|
}, attr));
|
||||||
this.channels.unshift(
|
this.channels.unshift(
|
||||||
new Chan({name: this.name, type: Chan.Type.LOBBY})
|
new Chan({name: this.name, type: Chan.Type.LOBBY})
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"user": "example",
|
"user": "example",
|
||||||
"password": "password",
|
"password": "password",
|
||||||
"networks": [{
|
"networks": [{
|
||||||
|
"name": "Rizon",
|
||||||
"host": "irc.rizon.net",
|
"host": "irc.rizon.net",
|
||||||
"port": 6667,
|
"port": 6667,
|
||||||
"password": "serverpw"
|
"password": "serverpw"
|
||||||
|
Loading…
Reference in New Issue
Block a user