MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AutoConnectLANIP

Function AutoConnectLANIP

Descent3/multi_ui.cpp:714–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712}
713
714int AutoConnectLANIP() {
715 // char seldll[_MAX_PATH];
716 int iparg;
717 int portarg;
718 MultiDLLGameStarting = 0;
719 iparg = FindArg("ip");
720 if (!iparg) {
721 int connarg = FindArg("-directip");
722
723 if (!connarg)
724 return 0;
725 strcpy(Auto_login_addr, GameArgs[connarg + 1]);
726 char *port = strchr(Auto_login_addr, ':');
727 if (port) {
728 // terminate the hostname
729 *port = '\0';
730 // Increment to the first character of the port name
731 port++;
732 // get the port number
733 strcpy(Auto_login_port, port);
734 }
735 } else {
736 strcpy(Auto_login_addr, GameArgs[iparg + 1]);
737
738 portarg = FindArg("port");
739 if (portarg) {
740 strcpy(Auto_login_port, GameArgs[portarg + 1]);
741 } else {
742 Auto_login_port[0] = '\0';
743 }
744 }
745 // ddio_MakePath(seldll,Base_directory,"online","Direct TCP~IP Game.d3c",NULL);
746 if (LoadMultiDLL("Direct TCP~IP")) {
747 CallMultiDLL(MT_AUTO_LOGIN);
748 }
749 return MultiDLLGameStarting;
750}
751
752int AutoConnectHeat() {
753 // char seldll[_MAX_PATH];

Callers 1

ProcessCommandLineFunction · 0.85

Calls 3

LoadMultiDLLFunction · 0.85
CallMultiDLLFunction · 0.85
FindArgFunction · 0.70

Tested by

no test coverage detected