Added IRC support (WIP).

This commit is contained in:
2022-10-17 04:06:55 +02:00
parent f7113b72ce
commit 4ce3f77c63
9 changed files with 490 additions and 71 deletions

35
src/utils/style.js Normal file
View File

@@ -0,0 +1,35 @@
'use strict';
const config = require('config');
const styles = require('irc-colors');
function schatBold(text) {
return `**${text}**`;
}
function schatItalic(text) {
return `*${text}*`;
}
function bypass(text) {
return text;
}
module.exports = (() => {
if (config.platform === 'irc') {
return styles;
}
if (config.platform === 'schat') {
return {
bold: schatBold,
italic: schatItalic,
red: bypass,
getter(...args) {
console.log(args);
},
};
}
return null;
})();