iw4x-client/src/Components/Modules/News.cpp

25 lines
421 B
C++
Raw Normal View History

#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()
{
News::Motd = Utils::WebIO("IW4x", "http://localhost/iw4/motd.txt").Get();
if (!News::Motd.size())
{
News::Motd = "Welcome to ReactIW4x Multiplayer!";
}
// Patch motd setting
Utils::Hook(0x60BF19, News::GetMotd, HOOK_CALL).Install()->Quick();
}
}