MrMeapify / sleepychat

Because Omegle was just getting annoying.
4 stars 13 forks source link

Option to exclude people already chatted to from matchmaking #27

Open xsungazerx opened 9 years ago

xsungazerx commented 9 years ago

When starting a new chat, add an option for matchmaking to:

INCLUDE people I have already talked to EXCLUDE people I have already talked to

This would greatly improve the matchmaking process. This is likely to be per session only, due to the (I presume?) lack of persistent state of users, but assuming both chat participants use the same nickname, and the nickname pool has a high enough number of combinations to make collisions with new people improbable, should be sufficient and could be controlled entirely client side.

e.g. client sends to the server a list of nicks they've already talked to in this session, and server will exclude them from matchmaking.

Elysian-Anon commented 9 years ago

This is very difficult to do without username registration. Rest assured that the option will be included in the update that gains the username system. Until then, however, this feature will not come to pass.

MrMeapify commented 9 years ago

ElysianTail, that's actually not true. The client already sends a string with the nick of the last person they talked to, just to make sure they don't connect to the same person over and over. You could easily send an exclusion list along with that data. Around line 332 of the app.js file, just make it say that, if the nickname is in the given exclusion list, then set the variable good to false. Then, on the clientside, make it so that the exclusion list is populated when this feature is turned on, and have it sent (or an empty array when it's turned off) with the socket.getNewChat request.

ghost commented 9 years ago

If it works the way I think it works, then that shouldn't be too big of a problem. Since ( I think ) you're matched up with whoever's been the longest without getting a chat, it tends to not match you up with the same person twice when there are other options available. For example:

  1. Tists A, B, and C join sleepychat, in that order
  2. Sub Z joins, and is matched up with tist A because he's been waiting the longest
  3. Tist A is AFK, so sub Z disconnects
  4. New order for tists is B, C, A, so Z get's matched with B

Am I correct in this?