Merge branch 'chat_bugfix' into 'develop'
Fix a bug with trying to update IRC channels when IRC is disabled. See merge request knotteye/satyr!20merge-requests/21/head
commit
4baa07123f
10
src/chat.ts
10
src/chat.ts
|
@ -94,12 +94,14 @@ async function updateUsers() {
|
||||||
async function updateInteg() {
|
async function updateInteg() {
|
||||||
if(liveUsers.length === 0) {
|
if(liveUsers.length === 0) {
|
||||||
chatIntegration = [];
|
chatIntegration = [];
|
||||||
|
if(config['chat']['irc']['enabled']) updateIRCChan();
|
||||||
|
if(config['chat']['twitch']['enabled']) updateTwitchChan();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(liveUsers.length === 1) {
|
if(liveUsers.length === 1) {
|
||||||
chatIntegration = await db.query('SELECT * FROM chat_integration WHERE username='+db.raw.escape(liveUsers[0]['username']));
|
chatIntegration = await db.query('SELECT * FROM chat_integration WHERE username='+db.raw.escape(liveUsers[0]['username']));
|
||||||
updateIRCChan();
|
if(config['chat']['irc']['enabled']) updateIRCChan();
|
||||||
updateTwitchChan();
|
if(config['chat']['twitch']['enabled']) updateTwitchChan();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var qs: string;
|
var qs: string;
|
||||||
|
@ -108,8 +110,8 @@ async function updateInteg() {
|
||||||
}
|
}
|
||||||
qs = qs.substring(0, qs.length - 13);
|
qs = qs.substring(0, qs.length - 13);
|
||||||
chatIntegration = await db.query('SELECT * FROM chat_integration WHERE username='+qs);
|
chatIntegration = await db.query('SELECT * FROM chat_integration WHERE username='+qs);
|
||||||
updateIRCChan();
|
if(config['chat']['irc']['enabled']) updateIRCChan();
|
||||||
updateTwitchChan();
|
if(config['chat']['twitch']['enabled']) updateTwitchChan();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendAll(user: string, msg: Array<string>, src: string) {
|
async function sendAll(user: string, msg: Array<string>, src: string) {
|
||||||
|
|
Reference in New Issue