Permalink
Browse files

Version 1.0.1

- Ensure results exist before checking streams.
- Don't check for people losing mod status
- Don't greet people if they were already mods.
- Do not greet SixBotGG or SixGamingGG.
  • Loading branch information...
roncli committed Mar 8, 2016
1 parent eaedd28 commit 64b35a734dddad9393da40c7f5229737dbabe320
Showing with 14 additions and 17 deletions.
  1. +9 −0 README.md
  2. +1 −1 package.json
  3. +4 −16 sixgaming.js
View
@@ -43,6 +43,15 @@ The following should be the contents of settings.js:
Version History
===============
1.0.1 - 3/7/2016
----------------
This is a bug fix release.
* Do not greet SixBotGG or SixGamingGG in chat.
* Do not assume people have been unmodded, and do not greet if they were already modding.
* Check if `response` is an object before trying to check the `stream` object.
1.0.0 - 3/2/2016
----------------
View
@@ -1,6 +1,6 @@
{
"name": "SixBotGG",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Twitch IRC bot for Six Gaming.",
"homepage": "https://github.com/roncli/SixBotGG",
"bugs": {
View
@@ -48,7 +48,7 @@ SixGaming.start = function(_client, _twitch) {
index = 0,
tryHosting = function() {
twitch.getChannelStream(streamers[index], function(err, results) {
if (err) {
if (err || !results) {
index++;
} else {
if (results.stream) {
@@ -151,12 +151,6 @@ SixGaming.start = function(_client, _twitch) {
SixGaming["+mode"](by, mode, argument, message);
}
});
client.addListener("-mode", function(channel, by, mode, argument, message) {
if (channel === "#sixgaminggg") {
SixGaming["-mode"](by, mode, argument, message);
}
});
});
checkSixIsLive();
@@ -190,16 +184,10 @@ SixGaming.part = function(nick, reason, message) {
};
SixGaming["+mode"] = function(by, mode, argument, message) {
if (mode === "o") {
if (mode === "o" && nicks[message.args[2]] !== "o") {
nicks[message.args[2]] = "o";
SixGaming.queue("Hi, " + message.args[2] + "! HeyGuys");
}
};
SixGaming["-mode"] = function(by, mode, argument, message) {
if (mode === "o") {
if (nicks[message.args[2]] === "o") {
nicks[message.args[2]] = "";
if (message.args[2] !== "sixbotgg" && message.args[2] !== "sixgaminggg") {
SixGaming.queue("Hi, " + message.args[2] + "! HeyGuys");
}
}
};

0 comments on commit 64b35a7

Please sign in to comment.