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

Add an 'action' event #134

Closed
rretzbach opened this issue Jan 13, 2013 · 4 comments
Closed

Add an 'action' event #134

rretzbach opened this issue Jan 13, 2013 · 4 comments

Comments

@rretzbach
Copy link

Currently only sending actions is supported, like "/me is coding" via

client.action(channel, 'is coding');

There should therefore also be an 'action' event to be able to register a listener for action messages. As a workaround you can add a listener to the 'raw' event like this:

client.addListener('raw', function (message) {
    if (message.args[1]) {
        var match = message.args[1].match(/^\u0001ACTION (.+)\u0001$/);
        if (match) {
            socket.emit('action', { nick: message.nick, to: message.args[0], timestamp: getTime(),message: match[1] });
        }
    }
});
@katanacrimson
Copy link
Contributor

@rretzbach better workaround is hooking onto ctcp, iirc.

@Pumpuli
Copy link
Contributor

Pumpuli commented Jan 14, 2013

There already is an action event...?

@rretzbach
Copy link
Author

You are right. I only looked at the last two versions which were released. I should pay more attention to the master branch...

@halkeye
Copy link

halkeye commented Jul 25, 2013

Just FYI this is not actually in the documentation.

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

4 participants