2 small fixes

This commit is contained in:
Evert Prants 2016-09-29 20:25:53 +03:00
parent 8da018c59f
commit 8c7c147aed
2 changed files with 5 additions and 3 deletions

View File

@ -1734,10 +1734,11 @@ class IRCChatWindow {
if(user.nickname == irc.serverData[server].my_nick)
buffer.setAliveStatus(true);
else
buffer.nicklist.nickAdd(user.nickname);
buffer.addMessage("<span class='hostmask'>{0}@{1}</span> has joined <span class='channel'>{2}</span>".format(user.username,
user.hostname, channel), user.nickname, "join");
buffer.nicklist.nickAdd(user.nickname);
}
handleLeave(server, user, channel, reason, kicker) {

View File

@ -49,8 +49,8 @@ function printRuntimeStats() {
}
}
if(servers != 0)
serversPerUser = users/servers;
if(users != 0) // Don't divide by zero lmao
serversPerUser = servers/users;
console.log(date+": Currently connected users: "+users+"; IRC server connections: "+servers+"; Average servers per user: "+serversPerUser+"; Total connections made: "+runtime_stats.connectionsMade);
}
@ -209,5 +209,6 @@ process.on('SIGINT', () => {
connections[c][ircconn].disconnect();
}
}
printRuntimeStats();
process.exit();
});