mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove "Server -!- " prefix from player messages
This commit is contained in:
parent
18fd913e69
commit
9a3b7715e2
5 changed files with 7 additions and 15 deletions
|
@ -52,21 +52,17 @@ int ModApiServer::l_chat_send_all(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// chat_send_player(name, text, prepend)
|
||||
// chat_send_player(name, text)
|
||||
int ModApiServer::l_chat_send_player(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
const char *name = luaL_checkstring(L, 1);
|
||||
const char *text = luaL_checkstring(L, 2);
|
||||
bool prepend = true;
|
||||
|
||||
if (lua_isboolean(L, 3))
|
||||
prepend = lua_toboolean(L, 3);
|
||||
|
||||
// Get server from registry
|
||||
Server *server = getServer(L);
|
||||
// Send
|
||||
server->notifyPlayer(name, narrow_to_wide(text), prepend);
|
||||
server->notifyPlayer(name, narrow_to_wide(text));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue