| 750 | } |
| 751 | |
| 752 | int AutoConnectHeat() { |
| 753 | // char seldll[_MAX_PATH]; |
| 754 | int iparg; |
| 755 | int portarg; |
| 756 | MultiDLLGameStarting = 0; |
| 757 | iparg = FindArg("ip"); |
| 758 | if (!iparg) { |
| 759 | int connarg = FindArg("-heat"); |
| 760 | |
| 761 | if (!connarg) |
| 762 | return 0; |
| 763 | strcpy(Auto_login_addr, GameArgs[connarg + 1]); |
| 764 | char *port = strchr(Auto_login_addr, ':'); |
| 765 | if (port) { |
| 766 | // terminate the hostname |
| 767 | *port = '\0'; |
| 768 | // Increment to the first character of the port name |
| 769 | port++; |
| 770 | // get the port number |
| 771 | strcpy(Auto_login_port, port); |
| 772 | } |
| 773 | } else { |
| 774 | strcpy(Auto_login_addr, GameArgs[iparg + 1]); |
| 775 | |
| 776 | portarg = FindArg("port"); |
| 777 | if (portarg) { |
| 778 | strcpy(Auto_login_port, GameArgs[portarg + 1]); |
| 779 | } else { |
| 780 | Auto_login_port[0] = '\0'; |
| 781 | } |
| 782 | } |
| 783 | if (LoadMultiDLL("HEAT.NET")) { |
| 784 | CallMultiDLL(MT_AUTO_LOGIN); |
| 785 | } |
| 786 | return MultiDLLGameStarting; |
| 787 | } |
| 788 | |
| 789 | #include "mem.h" |
| 790 |
no test coverage detected