Skip to content

Instantly share code, notes, and snippets.

@dpower-lv
Forked from dherman/irccloud.js
Last active October 27, 2015 12:41
Show Gist options
  • Save dpower-lv/291d6cbb406ccbfb1fc3 to your computer and use it in GitHub Desktop.
Save dpower-lv/291d6cbb406ccbfb1fc3 to your computer and use it in GitHub Desktop.
some useful commands for doing batch IRC admin in IRCCloud via the developer console
// print all the active PM conversations in moz IRC
console.log(JSON.stringify(Array.prototype.slice.call($("#buffers .connection:has(.buffer[href*='irc.gtanet.com']) ul.conversations > li.conversation .label")).map(span => span.firstChild.wholeText)))
// print all archived PM conversations in moz IRC
console.log(JSON.stringify(Array.prototype.slice.call($("#buffers .connection:has(.buffer[href*='irc.gtanet.com']) ul.openArchives > li.conversation .label")).map(span => span.firstChild.wholeText)))
// delete all conversations from a `spambots` array
(function(textarea) {
spambots.forEach((nick, i) => setTimeout(() => {
textarea.focus();
textarea.value = "/rm " + nick;
$(textarea.form).trigger('submit')
}, i * 75));
})(document.activeElement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment