Do not crash when awayMessage is set but IRC connection does not
This commit is contained in:
parent
218e06fbd4
commit
b5b0ebe00d
@ -542,7 +542,7 @@ Client.prototype.clientAttach = function(socketId, token) {
|
|||||||
client.networks.forEach(function(network) {
|
client.networks.forEach(function(network) {
|
||||||
// Only remove away on client attachment if
|
// Only remove away on client attachment if
|
||||||
// there is no away message on this network
|
// there is no away message on this network
|
||||||
if (!network.awayMessage) {
|
if (network.irc && !network.awayMessage) {
|
||||||
network.irc.raw("AWAY");
|
network.irc.raw("AWAY");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -584,7 +584,7 @@ Client.prototype.clientDetach = function(socketId) {
|
|||||||
client.networks.forEach(function(network) {
|
client.networks.forEach(function(network) {
|
||||||
// Only set away on client deattachment if
|
// Only set away on client deattachment if
|
||||||
// there is no away message on this network
|
// there is no away message on this network
|
||||||
if (!network.awayMessage) {
|
if (network.irc && !network.awayMessage) {
|
||||||
network.irc.raw("AWAY", client.awayMessage);
|
network.irc.raw("AWAY", client.awayMessage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user