node-irc icon indicating copy to clipboard operation
node-irc copied to clipboard

Support a setting that keeps retrying for your nick

Open paladox opened this issue 9 years ago • 5 comments

Hi could you please create a new setting that a user can set that will keep retrying for the specified nick name. Since net splits and the client keeps quitting when they re join, they come under a different name.

This would be useful for bot's.

paladox avatar Oct 30 '16 17:10 paladox

You can try this fork of node-irc: https://github.com/matrix-org/node-irc

sh1omi avatar Oct 30 '16 18:10 sh1omi

Oh thanks for link.

Is there a way to create custom commands like ! and the ability to match the message please?

paladox avatar Oct 31 '16 15:10 paladox

There is docs for node-irc: https://node-irc.readthedocs.io/en/latest/API.html there is a "message" event to get the messages.

You can also check my bot https://github.com/sh1omi/IrcBot (the bot not using node-irc).

sh1omi avatar Nov 01 '16 08:11 sh1omi

Thankyou.

paladox avatar Nov 04 '16 11:11 paladox

@sh1omi you don't need to use a fork to hook to a already existing event, ffs.

@paladox try hooking on the nick event, check if the old_nick is your configured nick and then update whatever you need to with new_nick. lib for reference

ex:

const myNick = "n04rk5";
client.addListener('nick', (oldNick, newNick) => {
    if (oldNick === myNick) {
        // do something
    }
});

moshmage avatar Nov 26 '16 03:11 moshmage