diff options
| author | OmniTroid <davidskoland@gmail.com> | 2017-04-07 13:30:40 +0200 |
|---|---|---|
| committer | OmniTroid <davidskoland@gmail.com> | 2017-04-07 13:30:40 +0200 |
| commit | 62a9bc94b6eb8203929f3732cdf0eb7577c1c052 (patch) | |
| tree | 9409d998b4ef368dbb26c38b6b0158c81e526c96 | |
| parent | 2510a89c54ade5a315581c82e94c4631087eb76c (diff) | |
added some functionality with master
| -rw-r--r-- | hardware_functions.cpp | 14 | ||||
| -rw-r--r-- | packet_distribution.cpp | 8 |
2 files changed, 16 insertions, 6 deletions
diff --git a/hardware_functions.cpp b/hardware_functions.cpp index 0b161c3d..b566f227 100644 --- a/hardware_functions.cpp +++ b/hardware_functions.cpp @@ -10,12 +10,14 @@ BOOL bIsRetrieved; QString get_hdid() { - 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 + bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL); + + if (bIsRetrieved) + return QString::number(dwVolSerial, 16); + else + //literally a random string + //what could possibly go wrong + return "gxsps32sa9fnwic92mfbs0"; } diff --git a/packet_distribution.cpp b/packet_distribution.cpp index 4c0e15fb..105feae2 100644 --- a/packet_distribution.cpp +++ b/packet_distribution.cpp @@ -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: |
