Comparing version 0.2.0 to 0.2.1
@@ -5,5 +5,3 @@ var irc = require('./lib/xdcc').irc; | ||
var user = 'desu' + Math.random().toString(36).substr(7, 3); | ||
var hostUser = 'Doki|Kotomi'; | ||
var pack = 10; | ||
var meta, bar; | ||
var hostUser = 'Doki|Kotomi', pack = 10, progress; | ||
@@ -23,7 +21,5 @@ console.log('Connecting...'); | ||
client.on('xdcc-connect', function(_meta) { | ||
meta = _meta; | ||
client.on('xdcc-connect', function(meta) { | ||
console.log('Connected: ' + meta.ip + ':' + meta.port); | ||
bar = new ProgressBar('Downloading... [:bar] :percent, :etas remaining', { | ||
progress = new ProgressBar('Downloading... [:bar] :percent, :etas remaining', { | ||
incomplete: ' ', | ||
@@ -37,3 +33,3 @@ total: meta.length, | ||
client.on('xdcc-data', function(received) { | ||
bar.tick(received - last); | ||
progress.tick(received - last); | ||
last = received; | ||
@@ -48,3 +44,3 @@ }); | ||
if (to == user && from == hostUser) { | ||
console.log("NOTICE " + message); | ||
console.log("[notice]", message); | ||
} | ||
@@ -51,0 +47,0 @@ }); |
@@ -5,2 +5,5 @@ var irc = require('irc') | ||
module.exports.irc = irc; | ||
if (irc.Client.prototype.getXdcc) return; | ||
function uint32ToIP(n) { | ||
@@ -63,3 +66,3 @@ var byte1 = n & 255 | ||
client.write(sendBuffer); | ||
self.emit('xdcc-data', received); | ||
self.emit('xdcc-data', received, details); | ||
}); | ||
@@ -74,3 +77,3 @@ | ||
file.end(); | ||
self.emit('xdcc-error', err); | ||
self.emit('xdcc-error', err, details); | ||
}); | ||
@@ -84,2 +87,1 @@ }); | ||
module.exports.irc = irc; |
{ | ||
"name": "xdcc", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Justin Li <jli@j-li.net>", | ||
@@ -10,4 +10,4 @@ "description": "A simple xdcc client", | ||
"dependencies": { | ||
"irc": "~0.3.6" | ||
"irc": ">=0.3.0" | ||
} | ||
} |
node-xdcc | ||
========= | ||
[![npm version](http://img.shields.io/npm/v/xdcc.svg)](https://www.npmjs.org/package/xdcc) | ||
Monkey-patches `node-irc` to do xdcc file transfers. | ||
@@ -5,0 +7,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18
3884
5
105
+ Addediconv@2.2.3(transitive)
+ Addedirc@0.5.2(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-icu-charset-detector@0.2.0(transitive)
- Removedansi-color@0.2.1(transitive)
- Removediconv@2.1.11(transitive)
- Removedirc@0.3.12(transitive)
- Removednan@1.9.02.0.9(transitive)
- Removednode-icu-charset-detector@0.1.0(transitive)
Updatedirc@>=0.3.0