Skip to content

Commit

Permalink
- Fixed error in permisisons.js for getting an item from the array, a…
Browse files Browse the repository at this point in the history
…lso made setAllowSendMessages a sync method
  • Loading branch information
BrandenB committed Apr 14, 2020
1 parent 6b36cf7 commit 0028018
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion javascript-source/core/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@

restoreSubscriberStatus(spl[1].toLowerCase());
for (var i = 0; i < subUsers.size(); i++) {
subsTxtList.push(subUsers[i]);
subsTxtList.push(subUsers.get(i));
}
$.saveArray(subsTxtList, 'addons/subs.txt', false);
}
Expand Down
3 changes: 2 additions & 1 deletion source/tv/phantombot/twitch/irc/chat/utils/MessageQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void start(TwitchSession session) {
*
* @param {boolean} isAllowedToSend
*/
public void setAllowSendMessages(boolean isAllowedToSend) {
public synchronized void setAllowSendMessages(boolean isAllowedToSend) {
this.isAllowedToSend = isAllowedToSend;
}

Expand Down Expand Up @@ -144,6 +144,7 @@ public void run() {
}
} catch (WebsocketNotConnectedException ex) {
com.gmt2001.Console.err.println("Failed to send message due to being disconnected from Twitch IRC.");
this.setAllowSendMessages(false);
session.reconnect();
} catch (InterruptedException ex) {
com.gmt2001.Console.err.printStackTrace(ex);
Expand Down

0 comments on commit 0028018

Please sign in to comment.