Closed brightrim closed 2 years ago
Implemented the following in 669a8ec407785fb73aa8bc3be2d724a0ac9fb92d:
exists, id = world:getPlayerIdByName(name)
exists
: true
iff player with name exists in the database
id
: id of the player with name, if that player exists
Still needs to be documented: https://github.com/Illarion-eV/Illarion-Lua/issues/14
It would be very useful to have a server entry point that can check whether an entered string of text actually matches a character name in the database, returning a boolean value.
Examples of where this would be used: Housing -> When setting the tenant/guest/builder-permission names (Functions already exists on housing test server, but allows typing names of non-existent characters currently) GM tools -> When scheduling changes to quest statuses/other things for an offline players next login (Function already exists on live but allows typing names of non-existent characters currently) In game messengers -> When typing in the recipient for your message (Not yet implemented, ideally awaiting this server entry point before implementation)