From 306252ecdc19381f9b12c3725041ba31b80752e0 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 18 Apr 2018 19:10:58 +0300 Subject: [PATCH] [Server] Fix confusing script function names --- apps/openmw-mp/Script/Functions/Chat.cpp | 2 +- apps/openmw-mp/Script/Functions/GUI.hpp | 2 +- apps/openmw-mp/Script/ScriptFunctions.cpp | 4 ++-- apps/openmw-mp/Script/ScriptFunctions.hpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Chat.cpp b/apps/openmw-mp/Script/Functions/Chat.cpp index 47a3a99fb..80d0306ee 100644 --- a/apps/openmw-mp/Script/Functions/Chat.cpp +++ b/apps/openmw-mp/Script/Functions/Chat.cpp @@ -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,); diff --git a/apps/openmw-mp/Script/Functions/GUI.hpp b/apps/openmw-mp/Script/Functions/GUI.hpp index 3b20daeef..7b0da7deb 100644 --- a/apps/openmw-mp/Script/Functions/GUI.hpp +++ b/apps/openmw-mp/Script/Functions/GUI.hpp @@ -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); diff --git a/apps/openmw-mp/Script/ScriptFunctions.cpp b/apps/openmw-mp/Script/ScriptFunctions.cpp index 598b3d29f..edc4cd91b 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.cpp +++ b/apps/openmw-mp/Script/ScriptFunctions.cpp @@ -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 diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 747d5223e..df28f5846 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -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},