Merge pull request #1306 from thelounge/xpaw/remove-prettify

Remove hostname prettifier
This commit is contained in:
Al McKinlay 2017-07-09 15:03:08 +01:00 committed by GitHub
commit 590a63ae31

View File

@ -30,7 +30,10 @@ function Network(attr) {
chanCache: [],
});
this.name = attr.name || prettify(attr.host);
if (!this.name) {
this.name = this.host;
}
this.channels.unshift(
new Chan({
name: this.name,
@ -103,17 +106,3 @@ Network.prototype.getChannel = function(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);
}
}