Fixed bug
This commit is contained in:
parent
925a0c519d
commit
d01765e3cb
1 changed files with 4 additions and 4 deletions
8
index.js
8
index.js
|
@ -154,10 +154,10 @@ bot.addListener('error', function (message) {
|
||||||
* Fonction permettant de publier un message sur IRC
|
* Fonction permettant de publier un message sur IRC
|
||||||
* @param {String} where
|
* @param {String} where
|
||||||
* @param {String} what
|
* @param {String} what
|
||||||
* @param {Boolean} displayRadio
|
* @param {Boolean} dontDisplayRadio
|
||||||
*/
|
*/
|
||||||
const botSay = (where, what, displayRadio) => {
|
const botSay = (where, what, dontDisplayRadio) => {
|
||||||
const message = `${(displayRadio ? `${process.env.RADIO_ALIAS} : ` : '')} ${what}`
|
const message = `${(!dontDisplayRadio ? `${process.env.RADIO_ALIAS} : ` : '')} ${what}`
|
||||||
bot.say(where, message)
|
bot.say(where, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ if (process.env.SAY_HELLO && process.env.SAY_HELLO === 'true') {
|
||||||
bot.addListener('join', (channel, who) => {
|
bot.addListener('join', (channel, who) => {
|
||||||
// Welcome them in!
|
// Welcome them in!
|
||||||
if (who !== process.env.IRC_NICKNAME) {
|
if (who !== process.env.IRC_NICKNAME) {
|
||||||
botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/', false)
|
botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/', true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue