Make user leave channel from server-side

59 views
Skip to first unread message

Andreas Pfrengle

unread,
Oct 24, 2011, 11:11:15 AM10/24/11
to APE Project
Hello,

I want to make a user leave a channel from the server-side. I've got
the name of the channel and the username, but I have no idea how I
would do this. The docs have only examples with pubids and pipes, but
I don't know how to get this information on the server-side (python-
django application).

Any help is appreciated,
Andreas

Pablo Tejada

unread,
Oct 24, 2011, 1:45:40 PM10/24/11
to ape-p...@googlegroups.com

I never tried it but this might help http://www.ape-project.org/docs/server/users/left.html

Louis Charette

unread,
Oct 24, 2011, 1:46:53 PM10/24/11
to ape-p...@googlegroups.com
Hi,


You can get the pubid of a user client side with something like "this.core.user.pubid".

> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-p...@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project...@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/

Andreas Pfrengle

unread,
Oct 24, 2011, 2:56:31 PM10/24/11
to APE Project
Thanks for your answers, but actually that was not what I needed. I
was looking for sth. like "inlinepush", but for the "left" command. I
understand now that I would need to write my own JS server-side module
and probably save it in APE_Server/scripts/commands (there also lies
the "inlinepush.js"). However, this didn't work till now, but right
now it seems that a simple disconnect works also for me:
client.addEvent('apeDisconnect', function() {
client.core.quit({"name": "{{ username }}"}); // the {{username}}
is a template variable from django
});
Reply all
Reply to author
Forward
0 new messages