robotirc

Multifonction IRC bot written in Node.js
Log | Files | Refs | README | LICENSE

commit 3c067188d5d4b4edde5b5f8ed05cb1ef7de73045
parent 95727efed904100a8cf52249afcd94d5aee10c85
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Fri,  3 Jan 2014 00:00:18 +0100

Removing useless console.log call and linting the code

Diffstat:
Mlib/robotirc.js | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/lib/robotirc.js b/lib/robotirc.js @@ -27,7 +27,7 @@ var request = require('request'); /**[ Configuration ]**********************************************************/ -var config = require("../config.json") +var config = require("../config.json"); var client = new irc.Client(config.server, config.nickname, config.options); @@ -97,7 +97,6 @@ client.addListener('message', function(from, to, message) { function(error, response) { if (!error && response.statusCode == 200) { client.say(to, response.request.href); - console.log(response.request.href); } }); } @@ -109,11 +108,11 @@ client.addListener('message', function(from, to, message) { if (!error && response.statusCode == 200) { var geoip = JSON.parse(response.body); - for (item in data) { + for (var item in data) { client.say(to, item + ": " + geoip[item] + "\n"); } } - }) + }); } /***********************************************************[ !headers ]**/ @@ -121,11 +120,11 @@ client.addListener('message', function(from, to, message) { if (message.match(/^!headers/)) { request(params, function(error, response, body) { if (!error && response.statusCode == 200) { - for (item in response.headers) { + for (var item in response.headers) { client.say(to, item + ": " + response.headers[item] + "\n"); } } - }) + }); } /***********************************************************[ !resolve ]**/ @@ -133,13 +132,13 @@ client.addListener('message', function(from, to, message) { if (message.match(/^!resolve/)) { dns.resolve4(params, function(error, addresses) { if (!error) { - for (item in addresses) { + for (var item in addresses) { client.say(to, addresses[item] + "\n"); } } dns.resolve6(params, function(error, addresses) { if (!error) { - for (item in addresses) { + for (var item in addresses) { client.say(to, addresses[item] + "\n"); } }