Skip to content

Commit

Permalink
release 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JiPaix committed Apr 10, 2023
1 parent 13877fa commit 00cba5d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Changelog
## [v5.0.0](https://github.com/jipaix/xdccjs/tree/v5.0.0)
### BREAKING CHANGES
* `xdcc.irc` is no longer needed and accessible, methods and event are directly embed into `xdcc`
### fix(lib+cli)
* throttle doesn't affect bandwidth
* change units (KiB, MiB, GiB, etc..)
## feat(lib)
* add `xdcc.config()` - change/access parameters during runtime
* access irc-framework methods and events `xdcc.irc.join('#lol')` -> `xdcc.join('#lol')`
### refactor(lib)
* check user's parameters beforehand
---
## [v4.7.0](https://github.com/jipaix/xdccjs/tree/v4.7.0)
### feat(lib+cli)
* add option to throttle bandwidth
Expand Down
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ const opts = {
tls: {
enable: true, // Enable TLS Support - default: false
rejectUnauthorized: true, // Reject self-signed certificates - default: false
},
},
nickname: 'ItsMeJiPaix', // Nickname - default: xdccJS + random
nickServ: 'complex_password', // Your NickServ password (no spaces) - default: undefined (disabled)
chan: ['#candy', '#fruits'], // Array of channels - default : [ ] (no chan)
path: 'downloads', // Download path or 'false' - default: false (which enables piping)
nickServ: 'complex_password', // Your NickServ password (no spaces) - default: undefined (disabled)
retry: 2, // Nb of retries before skip - default: 1
timeout: 50, // Nb of seconds before a download is considered timed out - default: 30
verbose: true, // Display download progress and jobs status - default: false
Expand All @@ -93,6 +93,29 @@ const opts = {
// ^ Regex matching the bot's message when you're request is moved to a queue
}
```


### Config
>xdccJS.**config( parameters?** : object **)**
change parameters during runtime
If there's a file downloading `throttle` and `passivePort` won't be applied until the next download
```js
xdccJS.config({
passivePort: [5000, 5001, 5002],
throttle: 800,
nickname: 'TrustMe',
chan: ['#candy', '#fruits'],
path: 'download/subfolder',
botNameMatch: false,
retry: 5,
timeout: 50,
verbose: false,
randomizeNick: true,
queue: /soMething(.*)maTching/g
})
```


### Download
>xdccJS.**download( bot** : string, **packets** : string | number | number[] | string[], **ipv6?**: boolean **)**
`download()` is asynchronous and returns a `Job`
Expand Down Expand Up @@ -309,17 +332,15 @@ xdccJS.on('can-quit', () => {
})
```
## Advanced IRC commands
**xdccJS uses [@kiwiirc/irc-framework](https://github.com/kiwiirc/irc-framework)** client which is **entirely** accessible via the `irc` property.
**[@kiwiirc/irc-framework](https://github.com/kiwiirc/irc-framework) is embed into xdccJS**.
Check their client API [documentation](https://github.com/kiwiirc/irc-framework/blob/master/docs/clientapi.md)
```js
// middlewares
xdccJS.irc.use(middleware)
xdccJS.on('ready', () => {
// change nickname
xdccJS.irc.changeNick('new-nickname')
xdccJS.changeNick('new-nickname')
// listen to kick events
xdccJS.irc.on('kick', (info) => {
xdccJS.on('kick', (info) => {
//=> do something..
})
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xdccjs",
"version": "4.7.0",
"version": "5.0.0",
"description": "download files from XDCC bots on IRC, complete implementation of the XDCC protocol",
"engines": {
"node": ">=14.0.0"
Expand Down

0 comments on commit 00cba5d

Please sign in to comment.