Mass-op plugin for Colloquy
August 29, 2010
There’s no massop command in Colloquy, so here’s a javascript plugin that does it.
Copy/paste the following as whatever.js in your ~/Application Support/Colloquy/PlugIns/ directory:
function opNick(nick, connection, view) { connection.sendRawMessage("MODE " + view.target() + " +o " + nick); } function massOp(connection, view) { var members = view.chatMembers(); var len = members.length; for (var i = 0; i < len; i++) { if (!members[i].operator()) { opNick(members[i].nickname(), connection, view); } } return false; } // process the command and return true if you handle it or false to pass on to another plugin function processUserCommand( command, arguments, connection, view ) { // return true if the command was handled or to prevent other plugins or Colloquy from handling it if (command == 'mop') { massOp(connection, view); return true; } return false; } |
there’s a much uglier and mostly untested version that ops 3 nicks at a time to avoid mode spam at http://blog.rhp.org/mop3.js.txt
I think, that you commit an error. Write to me in PM, we will communicate.