Skip to content

Commit

Permalink
client: added error logging in error. tmijs#28
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoopiie committed Aug 8, 2015
1 parent cccc85e commit 7dda5e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ client.prototype.handleMessage = function handleMessage(message) {
self.wasCloseCalled = true;
self.log.error("Login unsuccessful.");
self.ws.close();
} else {
}
else if (contains(message.params[1], "Error logging in")) {
self.wasCloseCalled = true;
self.log.error("Error logging in.");
self.ws.close();
}
else {
self.log.warn("Could not parse NOTICE from tmi.twitch.tv:");
self.log.warn(message);
}
Expand Down

0 comments on commit 7dda5e2

Please sign in to comment.