Skip to content
Permalink
Browse files

[modBNCS] Recognize SID_REPORTVERSION/SID_AUTH_CHECK downgrade responses

- The bot now recognizes SID_REPORTVERSION response 0x03 and
  SID_AUTH_CHECK response 0x0102 for "downgrade required".
  At the time of writing, this can be seen on USEast official server
  199.108.55.51 for WarCraft III.

- The bot now closes the connection on unknown responses to
  SID_REPORTVERSION or SID_AUTH_CHECK.
  • Loading branch information...
nmbook committed Nov 27, 2017
1 parent b900980 commit f63aeda435afca105400e5d9ee66751c3f1f224a
Showing with 10 additions and 3 deletions.
  1. +6 −3 trunk/modBNCS.bas
  2. +4 −0 trunk/modEvents.bas
@@ -367,9 +367,10 @@ On Error GoTo ERROR_HANDLER:
Case 2: 'Success
bSuccess = True
'Call Event_VersionCheck(0, sInfo)
Case 3: Call Event_VersionCheck(1, sInfo) '"Reinstall Required", Invalid version
Case 3: Call Event_VersionCheck(11, sInfo) 'Downgrade Version
Case Else:
frmChat.AddChat RTBColors.ErrorMessageText, "Unknown SID_REPORTVERSION Response: 0x" & ZeroOffset(lResult, 8)
Call frmChat.AddChat(RTBColors.ErrorMessageText, "Unknown 0x51 Response: 0x" & ZeroOffset(lResult, 8))
Call frmChat.DoDisconnect
End Select

If Config.IgnoreVersionCheck Then bSuccess = True
@@ -1770,6 +1771,7 @@ On Error GoTo ERROR_HANDLER:
bSuccess = True

Case &H100, &H101: Call Event_VersionCheck(1, sInfo) 'Outdated/Invalid Version
Case &H102: Call Event_VersionCheck(11, sInfo) 'Downgrade Version
Case &H200: Call Event_VersionCheck(2, sInfo) 'Invalid CDKey
Case &H201: Call Event_VersionCheck(6, sInfo) 'CDKey is In Use
Case &H202: Call Event_VersionCheck(5, sInfo) 'CDKey is Banned
@@ -1779,7 +1781,8 @@ On Error GoTo ERROR_HANDLER:
Case &H212: Call Event_VersionCheck(9, sInfo) 'Exp CDKey is Banned
Case &H213: Call Event_VersionCheck(10, sInfo) 'Exp CDKey is for the wrong product
Case Else:
Call frmChat.AddChat(RTBColors.ErrorMessageText, "Unknown 0x51 Response: 0x" & ZeroOffset(lResult, 8))
Call frmChat.AddChat(RTBColors.ErrorMessageText, "Unknown SID_AUTH_CHECK Response: 0x" & ZeroOffset(lResult, 8))
Call frmChat.DoDisconnect
End Select

If Config.IgnoreVersionCheck Then bSuccess = True
@@ -1877,6 +1877,10 @@ Public Sub Event_VersionCheck(Message As Long, ExtraInfo As String)

frmChat.AddChat RTBColors.ErrorMessageText, "[BNCS] Your expansion CD-key is for another game."

Case 11:
frmChat.AddChat RTBColors.ErrorMessageText, "[BNCS] Version check failed! " & _
"The Battle.net server says your version must be downgraded."

Case Else
frmChat.AddChat RTBColors.ErrorMessageText, "Unhandled 0x51 response! Value: " & Message
End Select

0 comments on commit f63aeda

Please sign in to comment.
You can’t perform that action at this time.