mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
[Client] Don't use try/catch when printing missing plugins
Also move load order note to bottom where it fits better.
This commit is contained in:
parent
4294508082
commit
f80a16b897
@ -60,7 +60,6 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
|||||||
bool full = false)
|
bool full = false)
|
||||||
{
|
{
|
||||||
std::ostringstream sstr;
|
std::ostringstream sstr;
|
||||||
sstr << "Note: Use the same load order as the server.\n";
|
|
||||||
size_t pluginNameLen1 = 0;
|
size_t pluginNameLen1 = 0;
|
||||||
size_t pluginNameLen2 = 0;
|
size_t pluginNameLen2 = 0;
|
||||||
for (size_t i = 0; i < checksums.size(); i++)
|
for (size_t i = 0; i < checksums.size(); i++)
|
||||||
@ -82,25 +81,18 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
|||||||
{
|
{
|
||||||
string plugin;
|
string plugin;
|
||||||
unsigned val;
|
unsigned val;
|
||||||
try
|
|
||||||
|
if (i < checksums.size())
|
||||||
{
|
{
|
||||||
plugin = checksums.at(i).first;
|
plugin = checksums.at(i).first;
|
||||||
val = checksums.at(i).second[0];
|
val = checksums.at(i).second[0];
|
||||||
}
|
|
||||||
catch(exception &e)
|
|
||||||
{
|
|
||||||
plugin = "null";
|
|
||||||
val = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin == "null")
|
printWithWidth(sstr, plugin, pluginNameLen1 + 2);
|
||||||
{
|
printWithWidth(sstr, intToHexStr(val), 14);
|
||||||
printWithWidth(sstr, "", pluginNameLen1 + 16);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printWithWidth(sstr, plugin, pluginNameLen1 + 2);
|
printWithWidth(sstr, "", pluginNameLen1 + 16);
|
||||||
printWithWidth(sstr, intToHexStr(val), 14);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printWithWidth(sstr, checksumsResponse[i].first, pluginNameLen2 + 2);
|
printWithWidth(sstr, checksumsResponse[i].first, pluginNameLen2 + 2);
|
||||||
@ -116,7 +108,7 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
|||||||
sstr << "any";
|
sstr << "any";
|
||||||
sstr << "\n";
|
sstr << "\n";
|
||||||
}
|
}
|
||||||
sstr << "\nMore info in logs";
|
sstr << "\nNote: Use the same load order as the server.";
|
||||||
return sstr.str();
|
return sstr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user