1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-27 17:09:40 +00:00

[Server] Fix confusing script function names

This commit is contained in:
David Cernat 2018-04-18 19:10:58 +03:00
parent 9e5ddeac50
commit 306252ecdc
4 changed files with 8 additions and 8 deletions

View file

@ -23,7 +23,7 @@ void ScriptFunctions::SendMessage(unsigned short pid, const char *message, bool
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_CHAT_MESSAGE)->Send(true);
}
void ScriptFunctions::CleanChatByPid(unsigned short pid)
void ScriptFunctions::CleanChatForPid(unsigned short pid)
{
Player *player;
GET_PLAYER(pid, player,);

View file

@ -89,7 +89,7 @@ public:
* \param pid The player ID for whom the listbox should appear.
* \param id The numerical ID of the listbox.
* \param label The text at the top of the listbox.
* \parm buttons The items in the listbox, separated by newlines (e.g. "Item 1\nItem 2").
* \parm items The items in the listbox, separated by newlines (e.g. "Item 1\nItem 2").
* \return void
*/
static void ListBox(unsigned short pid, int id, const char *label, const char *items);

View file

@ -144,9 +144,9 @@ const char *ScriptFunctions::GetIP(unsigned short pid) noexcept
return addr.ToString(false);
}
void ScriptFunctions::SetModname(const char *name) noexcept
void ScriptFunctions::SetGameMode(const char *gameMode) noexcept
{
mwmp::Networking::getPtr()->getMasterClient()->SetModname(name);
mwmp::Networking::getPtr()->getMasterClient()->SetModname(gameMode);
}
void ScriptFunctions::SetHostname(const char *name) noexcept

View file

@ -72,7 +72,7 @@ public:
* \param pid The player ID.
* \return void
*/
static void CleanChatByPid(unsigned short pid);
static void CleanChatForPid(unsigned short pid);
/**
* \brief Remove all messages from chat for everyone on the server.
@ -207,7 +207,7 @@ public:
* \param name The new game mode.
* \return void
*/
static void SetModname(const char* name) noexcept;
static void SetGameMode(const char* gameMode) noexcept;
/**
* \brief Set the name of the server, as displayed in the server browser.
@ -266,12 +266,12 @@ public:
{"GetServerVersion", ScriptFunctions::GetServerVersion},
{"GetProtocolVersion", ScriptFunctions::GetProtocolVersion},
{"GetAvgPing", ScriptFunctions::GetAvgPing},
{"SetModname", ScriptFunctions::SetModname},
{"SetGameMode", ScriptFunctions::SetGameMode},
{"SetHostname", ScriptFunctions::SetHostname},
{"SetServerPassword", ScriptFunctions::SetServerPassword},
{"SetRuleString", ScriptFunctions::SetRuleString},
{"SetRuleValue", ScriptFunctions::SetRuleValue},
{"CleanChatByPid", ScriptFunctions::CleanChatByPid},
{"CleanChatForPid", ScriptFunctions::CleanChatForPid},
{"CleanChat", ScriptFunctions::CleanChat},
{"GetIP", ScriptFunctions::GetIP},