Illarion-eV / Illarion-Server

Server for the online RPG Illarion
http://illarion.org
GNU Affero General Public License v3.0
27 stars 19 forks source link

Server Entry Point: Does Character by name X exist #91

Closed brightrim closed 2 years ago

brightrim commented 2 years ago

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)

vilarion commented 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