I can't give a complete solution but an idea. From your code, you store the
silenced status in a database and notified the user. But i think you should
also add logic that tell the APE server: this user is silenced in this
channel. Similar to i posted above.

You would add a private property to the user object which will be an array
of the channel names where he is silenced. You can check this array in a
SEND hook as an extra layer of security. And restore this array to the user
object from the database on a CONNECT hook.
On Oct 5, 2012 7:54 AM, "apeman" <[email protected]> wrote:

> maybe i will tell u how i see it and u tell me how u can see it :D
>
> i want make it this way
>
> Ape.registerCmd("INLINE", true, function(params, info) {
>         var user = Ape.getUserByPubid(params.user);
>         var userName = user.getProperty('name');
>         var channel = Ape.getChannelByPubid(params.pipe);
>         var channelName = channel.getProperty('name');
>
>         if (user) {
>                 if (params.silence) {
>                         sql.query("INSERT INTO `channel_silence`
> (`user_name`, `channel_name`) VALUES ('"+userName+"', '"+channelName+"');");
>                 } else {
>                         sql.query("DELETE FROM `channel_silence` WHERE
> `user_name` = '"+userName+"' AND `channel_name` = '"+channelName+"';");
>                 }
>                 user.pipe.sendRaw("inline", {"silence": params.silence});
>         }
>         return 1;
> });
>
> Ape.addEvent("mkchan", function(channel) {
>      here i want to take from mysql list of silenced users and make
> private list for this channel ... u think it can make the deal ??????
> });
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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/
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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