Merge pull request #1585 from thelounge/xpaw/fix-1584

Do not try to write user log if network is not found
This commit is contained in:
Jérémie Astori 2017-09-29 17:53:07 -04:00 committed by GitHub
commit 82b7b3549d

View File

@ -136,6 +136,10 @@ Chan.prototype.toJSON = function() {
function writeUserLog(client, msg) {
const target = client.find(this.id);
if (!target) {
return false;
}
userLog.write(
client.name,
target.network.host, // TODO: Fix #1392, multiple connections to same server results in duplicate logs