How do you login using node-irc?

It's very easy to set up and it works great. But nowhere in the documentation does it say how

/msg nickserv identify <pword>

      

The closest thing I could find

client.join('#yourchannel yourpass');

      

or maybe

For any commands that there aren’t methods for you can use the send() method which sends raw messages to the server
client.send('MODE', '#yourchannel', '+o', 'yournick');

      

but none of them are doing their job.

+3


source to share


2 answers


client.say("nickserv", "identify <pword>");

does not work? The API says it should be.



+7


source


To expand on the answer above, the only way I have found to really know when a client is fully connected is using mode autoConnect: false

on creation:



var client = new irc.Client('irc.freenode.net', 'CommandBot', {
  autoConnect: false
});
client.connect(retryCount, function(serverReply) {
  console.log("Connected!\n", serverReply);
  client.join('#channel', function(input) {
    console.log("Joined #channel");
    client.say('#channel', "Hi, madafaca");
  });
});

      

0


source







All Articles