Skip to content

Instantly share code, notes, and snippets.

@qgustavor
Created June 3, 2015 20:57
Show Gist options
  • Select an option

  • Save qgustavor/371f696597e34575924d to your computer and use it in GitHub Desktop.

Select an option

Save qgustavor/371f696597e34575924d to your computer and use it in GitHub Desktop.
Chatzilla automatic XDCC
// Usage:
// Start a XDCC download then use
// /eval [folowed with the code below]
(function down(i) {
let f = client.dcc.files,
s = f[f.length - 1].state,
_ = s.socketDisconnected;
s.socketDisconnected = () => {
_.call(s);
if (i === 1229) return; // LAST PACK NUMBER
client.networks['NETWORK NAME'].dispatch('msg [BOT NAME] xdcc send #' + i);
setTimeout(down, 5e3, i + 1)
};
})(1222); // NEXT PACK NUMBER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment