Commit b4182bc993260aceb0e09cfc9c5e7231c23e70ea
1 parent
4dcab66a17
Exists in
master
use irc-colors
Showing 2 changed files with 6 additions and 3 deletions Side-by-side Diff
index.js
... | ... | @@ -4,6 +4,8 @@ var config = ini.parse(fs.readFileSync(__dirname + '/config.ini', 'utf-8')); |
4 | 4 | var redis = require('redis'); |
5 | 5 | |
6 | 6 | var irc = require('irc'); |
7 | +var colors = require('irc-colors'); | |
8 | + | |
7 | 9 | var options = { |
8 | 10 | userName: config.globals.irc_nick, |
9 | 11 | password: config.globals.nickserv_password, |
... | ... | @@ -55,13 +57,13 @@ client.addListener('pm', function (from, message) { |
55 | 57 | redisClient.on("pmessage", function (pattern, channel, message) { |
56 | 58 | if (channel.match(/^kimochi/)) { |
57 | 59 | var gateway = channel.match(/gw:(.*)\.text/)[1]; |
58 | - client.say(config.globals.aaa_pull_channel, message + irc.colors.wrap(irc.colors.code.dark_red, ' (' + gateway + ')')); | |
60 | + client.say(config.globals.aaa_pull_channel, message + colors.purple(' (' + gateway + ')')); | |
59 | 61 | } |
60 | 62 | else if (channel.match(/^echi/)) { |
61 | 63 | var gateway = channel.match(/gw:(.*)\.message$/)[1]; |
62 | 64 | if (gateway == config.globals.echi_gw_blacklist) { |
63 | 65 | return; |
64 | 66 | } |
65 | - client.say(config.globals.topup_message_channel, message + irc.colors.wrap(irc.colors.code.dark_red, ' (' + gateway + ')')); | |
67 | + client.say(config.globals.topup_message_channel, message + colors.purple(' (' + gateway + ')')); | |
66 | 68 | } |
67 | 69 | }); |