~swag/armagetronad/0.2.9-sty+ct+ap-fork

« back to all changes in this revision

Viewing changes to src/network/nNetwork.cpp

  • Committer: SwagTron
  • Date: 2019-08-06 03:08:39 UTC
  • Revision ID: swagtron-20190806030839-sayvc2v0hhjrn2ur
Added SHOW_IP
SHOW_IP - Should your public IP be displayed when connecting to the master server? (Got Address IP:PORT)
Does not help for /players where your IP will still be displayed.
Left on by default, but after changing the value, it will save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1616
1616
// from nServerInfo.cpp
1617
1617
extern bool sn_AcceptingFromMaster;
1618
1618
 
 
1619
bool sn_showIP = true;
 
1620
static tConfItem<bool> sn_showIPConf("SHOW_IP",sn_showIP);
 
1621
 
1619
1622
void login_accept_handler(nMessage &m){
1620
1623
    if (sn_GetNetState()!=nSERVER && m.SenderID() == 0){
1621
1624
        if(m.End())
1672
1675
            m >> address;
1673
1676
            if ( !sn_IsLANAddress( address ) )
1674
1677
            {
1675
 
                if ( sn_myAddress != address )
 
1678
                if ( sn_myAddress != address && sn_showIP )
1676
1679
                {
1677
1680
                    con << "Got address " << address << ".\n";
1678
1681
                }
 
1682
                else
 
1683
                {
 
1684
                   con << "Got Address " << tOutput("$network_ip_hidden");
 
1685
                }
 
1686
 
1679
1687
                sn_myAddress = address;
1680
1688
            }
1681
1689