Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send CustomCommand to server #367

Closed
anonprophet opened this issue May 15, 2015 · 3 comments
Closed

Send CustomCommand to server #367

anonprophet opened this issue May 15, 2015 · 3 comments

Comments

@anonprophet
Copy link

i have pvpgn server (a server game), i want my bot use custom command
/nullinfo

client.addListener('pm', function(nick, message) {
    //console.log('Got private message from %s: %s', nick, message);
    if (message == '!sd') {
        client.say(['#crew'], '/nullinfo long messages goes here');
    };
});

but the code above just say in the channel '' /nullinfo statsdota update ''
, how to make it send that command to server ?

something like /raw nullinfo in mIRC

@Wolvan
Copy link

Wolvan commented Jun 24, 2015

You can access the underlying socket directly with client.conn. Then you can just do client.conn.write("nullinfo\r\n") and you should be all set

@ghost
Copy link

ghost commented Sep 4, 2015

Please use Client.send as it is said to be better than Client.conn: https://node-irc.readthedocs.org/en/latest/API.html#Client.send

Please accept as a viable answer and close. Thanks!

@jirwin
Copy link
Collaborator

jirwin commented Sep 4, 2015

+1

@jirwin jirwin closed this as completed Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants