Platform/Menu: Migration of Server_IsLan() into the master-server related code

This commit is contained in:
Marco Cawthorne 2024-01-02 11:59:16 -08:00
parent 4600a03165
commit cca461effe
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
3 changed files with 15 additions and 3 deletions

View File

@ -165,8 +165,7 @@ inet_refreshframe(void)
address = gethostcachestring(srv_fldAdress, i);
/* skip LAN */
if (!address || Server_IsLan(address)) {
if (!address) {
continue;
}

View File

@ -62,7 +62,8 @@ lan_refreshframe(void)
string ping;
address = gethostcachestring(srv_fldAdress, i);
if (!address || !Server_IsLan(address)) {
if (!address) {
continue;
}

View File

@ -14,6 +14,18 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
static bool
Server_IsLan(string address)
{
tokenizebyseparator(address, ".");
if (argv(0) == "192" && argv(1) == "168") {
return (1);
} else {
return (0);
}
}
string
Master_Resolve(void)
{