Add command to check addon revision

This commit is contained in:
Benau 2021-09-24 12:46:10 +08:00
parent daf1dcfb6b
commit 48cc830372

View File

@ -1683,6 +1683,17 @@ void ClientLobby::handleClientCommand(const std::string& cmd)
else else
music_manager->setMasterMusicVolume((float)vol / 10); music_manager->setMasterMusicVolume((float)vol / 10);
} }
else if (argv[0] == "addonrevision" && argv.size() == 2)
{
Addon* addon = addons_manager->getAddon(Addon::createAddonId(argv[1]));
if (!addon)
return;
core::stringw ret = addon->getName();
ret += core::stringw(L": revision ") +
core::stringw(addon->getInstalledRevision()) +
L"/" + core::stringw(addon->getRevision());
NetworkingLobby::getInstance()->addMoreServerInfo(ret);
}
else if (argv[0] == "liststkaddon") else if (argv[0] == "liststkaddon")
{ {
if (argv.size() > 3) if (argv.size() > 3)