2016-01-04 14:58:00 -05:00
|
|
|
#include "STDInclude.hpp"
|
2015-12-30 18:55:08 -05:00
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
std::string News::Motd;
|
|
|
|
|
|
|
|
const char* News::GetMotd()
|
|
|
|
{
|
|
|
|
return News::Motd.data();
|
|
|
|
}
|
|
|
|
|
|
|
|
News::News()
|
|
|
|
{
|
2016-01-11 18:48:27 -05:00
|
|
|
Localization::Set("MPUI_CHANGELOG_TEXT", "");
|
|
|
|
|
|
|
|
News::Motd = Utils::WebIO("IW4x", "http://localhost/iw4/motd.txt").SetTimeout(1000)->Get();
|
|
|
|
|
2015-12-30 18:55:08 -05:00
|
|
|
if (!News::Motd.size())
|
|
|
|
{
|
|
|
|
News::Motd = "Welcome to ReactIW4x Multiplayer!";
|
|
|
|
}
|
|
|
|
|
2016-01-11 18:48:27 -05:00
|
|
|
Localization::Set("MPUI_CHANGELOG_TEXT", Utils::WebIO("IW4x", "http://localhost/iw4/changelog.txt").SetTimeout(1000)->Get().data());
|
2016-01-07 18:59:59 -05:00
|
|
|
|
2015-12-30 18:55:08 -05:00
|
|
|
// Patch motd setting
|
|
|
|
Utils::Hook(0x60BF19, News::GetMotd, HOOK_CALL).Install()->Quick();
|
|
|
|
}
|
|
|
|
}
|