Ok, the functions have some (initially) unintended side-effects:

The "name" cvar can be read as an input after which the script can decide to 1) rename the player to that name 2) not rename the player at all 3) rename the player to a different name.
Basically these new functions allow for a "rename" event.

https://github.com/kungfooman/libcod...913e11caa7bf30