Added IRC support (WIP).
This commit is contained in:
35
src/utils/style.js
Normal file
35
src/utils/style.js
Normal 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;
|
||||
})();
|
||||
Reference in New Issue
Block a user