Skip to content

Instantly share code, notes, and snippets.

@westor7
Last active June 12, 2021 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westor7/48c9e213ed17dac667c36cbd6b780d96 to your computer and use it in GitHub Desktop.
Save westor7/48c9e213ed17dac667c36cbd6b780d96 to your computer and use it in GitHub Desktop.
KiwiIRC enter identify password if ask for on connect for REDHISPANA
kiwi.plugin('nickserv_identify', function(kiwi, log) {
kiwi.on('irc.notice', function(event, network) {
if (event.nick.toLowerCase() !== 'nickserv') { return; }
var IsLogged = network.ircClient.user.modes.has('r');
if (IsLogged) { return; }
var text = "nick pertenece a otra persona.";
if (!event.message.includes(text)) { return; }
setTimeout(nickserv_enter_password, 2000);
});
function nickserv_enter_password() {
var network = kiwi.state.getActiveNetwork();
if (!network) { return; }
var pass = prompt("Por favor ingrese su contraseña de identificación de apodo:");
if (!pass) { return; }
network.ircClient.say('nickserv', 'IDENTIFY '+ pass +'');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment