Skip to content

Commit c974521

Browse files
committed
[SSC] GetCurrentServerIP: Battle.net server's IP on proxy
- When on a proxy, this function now returns the Battle.net server's IP.
1 parent 432c910 commit c974521

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

trunk/clsScriptSupportClass.cls

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,10 +1623,14 @@ Public Function GetCurrentUsername()
16231623
End Function
16241624

16251625
'// GETCURRENTSERVERIP
1626-
'// Returns the IP of the server the bot is currently connected to.
1626+
'// Returns the IP of the server the bot is currently connected to, bypassing proxies.
16271627
Public Function GetCurrentServerIP()
16281628
If modGlobals.g_Online Then
1629-
GetCurrentServerIP = frmChat.sckBNet.RemoteHostIP
1629+
If ProxyConnInfo(stBNCS).IsUsingProxy Then
1630+
GetCurrentServerIP = ProxyConnInfo(stBNCS).RemoteHostIP
1631+
Else
1632+
GetCurrentServerIP = frmChat.sckBNet.RemoteHostIP
1633+
End If
16301634
Else
16311635
GetCurrentServerIP = vbNullString
16321636
End If

0 commit comments

Comments
 (0)