lythx / trakman

Trackmania Forever server controller written in TypeScript
https://trakman.ptrk.eu
MIT License
24 stars 4 forks source link

new search #256

Closed wsrvn closed 4 months ago

wsrvn commented 4 months ago

improved index based search for maplist (/list), commandlist (/help) and songlist (in theory). tested on a 300000 maps set, it performs about 100 times faster (~60 seconds against ~0.5 seconds). on smaller sets, such as the 50000 maps server i tested it on, the search is essentially immediate (~0.03 seconds against ~5 seconds). ymmv of course, but i dont think it can be made much quicker.

other changes also include correct types for admin service commands to make them work with nicknametoplayer, which was apparently never used. now it is, and it allows for nickname to player (no way!) "translation".

how it works is: lets say theres a player with the nickname "michael" whose login is "73836382mich888ael", you could just type "//kick michael" and the controller will kick the correct login. obviously, if there are multiple players with similar nicknames, the closer match will be kicked but thats another story.