Skip to content

Commit e48ef74

Browse files
Add files via upload
1 parent 8035b5b commit e48ef74

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## Release 0.2.2
1+
## Release 0.2.2r
2+
- Added confirmation dialog for Clear Twitch Chat.
23
- Bug fix regarding turning off recieving chat messages from Twitch where even when turned off, clients were still recieving messages.
34
- Added obfuscation of the Twitch OAuth token. On save the OAuth token will appear scrambled, it's totally fine! I just added this for streamers who may be showing
45
backend configuration in their streams to add a little bit of protection.

module.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"patreon": "TabletopsAndAnvils"
1313
}
1414
],
15-
"version": "0.2.2",
15+
"version": "0.2.2r",
1616
"minimumCoreVersion": "0.7.5",
1717
"compatibleCoreVersion": "0.7.9",
1818

@@ -59,5 +59,5 @@
5959
"url": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module",
6060

6161
"manifest": "https://raw.githubusercontent.com/TabletopsAndAnvils/Foundry-Stream-Module/main/module.json",
62-
"download": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/archive/0.2.2.zip"
62+
"download": "https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/archive/0.2.2r.zip"
6363
}

scripts/fsmcore.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ export function DisconnectTwitch() { // D I S C O N N E C T T W I T C H
7373
};
7474

7575
export function SilentTwitchClient() { // N O T C U R R E N T L Y U S E D
76+
console.log('OAuth token is not obfuscated!')
77+
let newvalue = game.settings.get("streamMod", "streamAuth");
78+
if (newvalue.includes("oauth:")) {
79+
game.settings.set("streamMod", "streamAuth", newvalue.obfs(13)) } else return SetupTwitchClient();
7680
fsMod.client = new tmi.Client({
7781
connection: {
7882
cluster: "aws",
@@ -97,7 +101,10 @@ export function SilentTwitchClient() { // N O T C U R R E N T L Y U S E D
97101
export function SetupTwitchClient() { // C O N N E C T T O T W I T C H
98102
// Set up twitch chat reader
99103
let obf = game.settings.get("streamMod", "streamAuth");
100-
let streamPW = obf.defs(13);
104+
console.log('Checking for obfuscation..')
105+
if (obf.includes("oauth:")) return SilentTwitchClient();
106+
console.log('OAuth token is obfuscated!');
107+
let streamPW = obf.defs(13);
101108
fsMod.client = new tmi.Client({
102109
connection: {
103110
cluster: "aws",

0 commit comments

Comments
 (0)