Derpthemeus / ChampionMastery.GG

League of Legends champion mastery highscores
https://championmastery.gg
MIT License
77 stars 28 forks source link

Support for summoner name change #7

Closed mikaeldui closed 8 years ago

mikaeldui commented 8 years ago

Some server+side code to handle summoner name changes. Needs some modifications to summoner.js in order to handle a redirect.

Derpthemeus commented 8 years ago

2 possible issues with this:

  1. There are a total of 3275 (131 champions * 25 places saved) highscore entries that will have to be iterated through every time a summoner isn't found. I'm not sure if this will have a significant impact on performance so I'll have to do some testing
  2. Neither the name in the highscores nor the name being looked up are guaranteed to be standardized. Spaces and capitalization are ignored in names so "Derpthemeus" is the same person as "d e r p t h e m e u s". It wouldn't be hard to store a standardized name with each highscore entry and check against that, but I'm not sure if standardization works the same across all regions with different languages.

I'm also looking into using a database so I can add another feature I've been trying to figure out for a while, which would change how this would work. I'll update this either way soon

Derpthemeus commented 8 years ago

I will soon be switching over to a database which will change a large amount of the back-end code and this feature should be added shortly after

Derpthemeus commented 8 years ago

Possible change in plans. I'm probably sticking with the current way things are being done. I'm currently figuring some stuff out

Derpthemeus commented 8 years ago

I just pushed a change that adds this feature. I didn't merge the pull request because I don't know how to change the target branch (I'm not too familiar with Git) and I didn't want to merge incomplete code into the master branch. I'll make some changes soon that should make contributing easier in the future