Rename ircPreventMention to parallelPingFix (#520)
This commit is contained in:
parent
4e807ca34d
commit
8a6dec41c6
@ -88,7 +88,7 @@ First you need to create a Discord bot user, which you can do by following the i
|
||||
"webhookAvatarURL": "https://robohash.org/{$nickname}" // Default avatar to use for webhook messages
|
||||
},
|
||||
"ircNickColor": false, // Gives usernames a color in IRC for better readability (on by default)
|
||||
"ircPreventMention": true, // Prevents users of both IRC and Discord from being mentioned in IRC when they speak in Discord (off by default)
|
||||
"parallelPingFix": true, // Prevents users of both IRC and Discord from being mentioned in IRC when they speak in Discord (off by default)
|
||||
// Makes the bot hide the username prefix for messages that start
|
||||
// with one of these characters (commands):
|
||||
"commandCharacters": ["!", "."],
|
||||
|
@ -37,7 +37,7 @@ class Bot {
|
||||
this.discordToken = options.discordToken;
|
||||
this.commandCharacters = options.commandCharacters || [];
|
||||
this.ircNickColor = options.ircNickColor !== false; // default to true
|
||||
this.ircPreventMention = options.ircPreventMention === true; // default: false
|
||||
this.parallelPingFix = options.parallelPingFix === true; // default: false
|
||||
this.channels = _.values(options.channelMapping);
|
||||
this.ircStatusNotices = options.ircStatusNotices;
|
||||
this.announceSelfJoin = options.announceSelfJoin;
|
||||
@ -327,7 +327,7 @@ class Bot {
|
||||
let text = this.parseText(message);
|
||||
let displayUsername = nickname;
|
||||
|
||||
if (this.ircPreventMention) {
|
||||
if (this.parallelPingFix) {
|
||||
// Prevent users of both IRC and Discord from
|
||||
// being mentioned in IRC when they talk in Discord.
|
||||
displayUsername = `${displayUsername.slice(0, 1)}\u200B${displayUsername.slice(1)}`;
|
||||
|
@ -336,8 +336,8 @@ describe('Bot', function () {
|
||||
}
|
||||
);
|
||||
|
||||
it('should break mentions when ircPreventMention is enabled', function () {
|
||||
const newConfig = { ...config, ircPreventMention: true };
|
||||
it('should break mentions when parallelPingFix is enabled', function () {
|
||||
const newConfig = { ...config, parallelPingFix: true };
|
||||
this.bot = new Bot(newConfig);
|
||||
this.bot.connect();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user