added some functionality with master

This commit is contained in:
OmniTroid 2017-04-07 13:30:40 +02:00
parent 2510a89c54
commit 62a9bc94b6
2 changed files with 15 additions and 5 deletions

View File

@ -10,12 +10,14 @@ BOOL bIsRetrieved;
QString get_hdid()
{
bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL);
bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL);
if (bIsRetrieved)
return QString::number(dwVolSerial, 16);
else
return "gxsps32sa9fnwic92mfbs0"; //what could possibly go wrong
if (bIsRetrieved)
return QString::number(dwVolSerial, 16);
else
//literally a random string
//what could possibly go wrong
return "gxsps32sa9fnwic92mfbs0";
}

View File

@ -76,6 +76,7 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
else if (header == "AO2CHECK")
{
send_ms_packet(new AOPacket("ID#AO2#" + get_version_string() + "#%"));
send_ms_packet(new AOPacket("HI#" + get_hdid() + "#%"));
if (f_contents.size() < 1)
goto end;
@ -107,6 +108,13 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
destruct_courtroom();
destruct_lobby();
}
else if (header == "DOOM")
{
call_notice("You have been exiled from AO."
"Have a nice day.");
destruct_courtroom();
destruct_lobby();
}
end: