From b4182bc993260aceb0e09cfc9c5e7231c23e70ea Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <gua@adhisimon.org>
Date: Tue, 15 Dec 2015 22:07:14 +0700
Subject: [PATCH] use irc-colors

---
 index.js     | 6 ++++--
 package.json | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/index.js b/index.js
index a534791..7de118b 100644
--- a/index.js
+++ b/index.js
@@ -4,6 +4,8 @@ var config = ini.parse(fs.readFileSync(__dirname + '/config.ini', 'utf-8'));
 var redis = require('redis');
 
 var irc = require('irc');
+var colors = require('irc-colors');
+
 var options = {
     userName: config.globals.irc_nick,
     password: config.globals.nickserv_password,
@@ -55,13 +57,13 @@ client.addListener('pm', function (from, message) {
 redisClient.on("pmessage", function (pattern, channel, message) {
     if (channel.match(/^kimochi/)) {
         var gateway = channel.match(/gw:(.*)\.text/)[1];
-        client.say(config.globals.aaa_pull_channel, message + irc.colors.wrap(irc.colors.code.dark_red, ' (' + gateway + ')'));
+        client.say(config.globals.aaa_pull_channel, message + colors.purple(' (' + gateway + ')'));
     }
     else if (channel.match(/^echi/)) {
         var gateway = channel.match(/gw:(.*)\.message$/)[1];
         if (gateway == config.globals.echi_gw_blacklist) {
             return;
         }
-        client.say(config.globals.topup_message_channel, message + irc.colors.wrap(irc.colors.code.dark_red, ' (' + gateway + ')'));
+        client.say(config.globals.topup_message_channel, message + colors.purple(' (' + gateway + ')'));
     }
 });
diff --git a/package.json b/package.json
index 874a3db..62939f7 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
   "dependencies": {
     "ini": "~1.3.4",
     "irc": "~0.4.0",
-    "redis": "~2.3.1"
+    "redis": "~2.3.1",
+    "irc-colors": "~1.2.0"
   }
 }
-- 
1.9.0