Skip to content
Permalink
Browse files

[SSC] GetCurrentServerIP: Battle.net server's IP on proxy

- 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 c9745210974df0d4bfd9c30bf9a44e12976bb34e
Showing with 6 additions and 2 deletions.
  1. +6 −2 trunk/clsScriptSupportClass.cls
@@ -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

0 comments on commit c974521

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