Skip to content

Commit

Permalink
[SSC] GetCurrentServerIP: Battle.net server's IP on proxy
Browse files Browse the repository at this point in the history
- When on a proxy, this function now returns the Battle.net server's IP.
  • Loading branch information
nmbook committed Dec 8, 2017
1 parent 432c910 commit c974521
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions trunk/clsScriptSupportClass.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1623,10 +1623,14 @@ Public Function GetCurrentUsername()
End Function

'// GETCURRENTSERVERIP
'// Returns the IP of the server the bot is currently connected to.
'// Returns the IP of the server the bot is currently connected to, bypassing proxies.
Public Function GetCurrentServerIP()
If modGlobals.g_Online Then
GetCurrentServerIP = frmChat.sckBNet.RemoteHostIP
If ProxyConnInfo(stBNCS).IsUsingProxy Then
GetCurrentServerIP = ProxyConnInfo(stBNCS).RemoteHostIP
Else
GetCurrentServerIP = frmChat.sckBNet.RemoteHostIP
End If
Else
GetCurrentServerIP = vbNullString
End If
Expand Down

0 comments on commit c974521

Please sign in to comment.