Hi,
playing with the meeting room lua script a little bit.
I have seen that when a user came in with the same name, there is disable on the client site or a script on the server side for detecting this.
Here is my first idea of fixing it on the culumus server side, i´m coming from the C world and its strange to see that i can define a variable without specifing it, see userExits :)
You have to include this in the main.lua script in your culumus www/yourmeetingroom.lua (<-only for example).
In this version i add a math random and a YOU identify, let me know if there is a better way to handle this.
-
function onConnection(client, userName, meeting)
client.userName = userName;
client.meeting = meeting;
INFO("User connected: ", client.userName , "meeting: ", client.meeting);
userExits = 0;
for key, cur_client in cumulus.clients:pairs() do
if (cur_client.meeting == meeting) then
print(cur_client.userName);
if (cur_client.userName == userName) then
userExits = 1;
end
end
end
if (userExits == 1) then
userName = userName .. "_" .. math.random(1,1000) .. " (YOU)";
client.userName = userName;
end