You should take a look at a map container (or however a hashed table/tree is called in the coding language you are using, std::map is c++).
If you are using c++ take a look at this: http://www.cplusplus.com/reference/map/map/
When you search in a map It does something similar to looking in a vector but it scales better (it's faster when you have a lot of entries (a lot being a few usualy)).
You could use the nikname as a key or (faster search usually) generate a unique ID (uint) for every player and use that.
btw, i dont think this is a networking question but w/e.