Remove hostname prettifier

This commit is contained in:
Pavel Djundik 2017-07-06 15:02:32 +03:00
parent fc231bca76
commit f06de70c40

View File

@ -30,7 +30,10 @@ function Network(attr) {
chanCache: [], chanCache: [],
}); });
this.name = attr.name || prettify(attr.host); if (!this.name) {
this.name = this.host;
}
this.channels.unshift( this.channels.unshift(
new Chan({ new Chan({
name: this.name, name: this.name,
@ -103,17 +106,3 @@ Network.prototype.getChannel = function(name) {
return that.name.toLowerCase() === name; return that.name.toLowerCase() === name;
}); });
}; };
function prettify(host) {
var name = capitalize(host.split(".")[1]);
if (!name) {
name = host;
}
return name;
}
function capitalize(str) {
if (typeof str === "string") {
return str.charAt(0).toUpperCase() + str.slice(1);
}
}