Hi!

I coded a registerHookCmd function to use with SEND command.
In this function I need to modify the message sended by the user (on
params.msg).
If I modify this var and then I do return 1 (to let Ape do his own
SEND command with the message modified) the message is sent without my
modification.

I will code for u a little example:

Clients sends -> "Hello"

Ape.registerHookCmd("SEND", function (params, cmd) {
   params.msg = params.msg+"-- WHOAH DEMO TEXT";
   return 1;
}

All the clients are supposed to recieve "Hello-- WHOAH DEMO TEXT" but
instead, they recieve just "Hello"

I think I know why this don't work. Just because params.msg its a copy
of the message, but no the message itself. But I want to know if there
is some method to do what I need whitout send my own data raw, because
I'm getting troubles when the message is in a user pipe instead of
beeing in a channel.

I hope that you could help me,
Thanks you and sorry for my english :)

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to