Hello
I'm trying to modify the ape chat demo to handle Arabic names, i made
demo.js file encodeURI the name of the user before sending it to the
APE server, then I updated the nickname.js as follows:
******************************
var userlist = new $H;
Ape.registerHookCmd("connect", function(params, cmd) {
if (!$defined(params.name)) return 0;
if (userlist.has(decodeURI(params.name.toLowerCase()))) return
["007", "NICK_USED"];
cmd.user.setProperty('name', decodeURI(params.name));
return 1;
});
Ape.addEvent('adduser', function(user) {
userlist.set(decodeURI(user.getProperty('name').toLowerCase()),
true);
});
Ape.addEvent('deluser', function(user) {
userlist.erase(decodeURI(user.getProperty('name').toLowerCase()));
});
******************************
But the name of user is still being sent from the APE server to the
client as encoded text (e.g: %D8%B9%20%B7) , I want the APE server to
send the name as a decoded string to the client.
Waiting for your help.
Thank you.
--
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/