mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Replace non-functional PXO server with new one
Replacing ut.parallaxonline.com with tracker.pxo.nottheeye.com.
This commit is contained in:
parent
7a9f2e2e19
commit
6057694b56
@ -41,7 +41,7 @@ extern mem_malloc_fp DLLmem_malloc;
|
||||
typedef void (*mem_free_fp)(void *memblock);
|
||||
extern mem_free_fp DLLmem_free;
|
||||
|
||||
typedef int (*nw_Asyncgethostbyname_fp)(uint32_t *ip, int command, char *hostname);
|
||||
typedef int (*nw_Asyncgethostbyname_fp)(uint32_t *ip, int command, const char *hostname);
|
||||
extern nw_Asyncgethostbyname_fp DLLnw_Asyncgethostbyname;
|
||||
|
||||
typedef int (*PollUI_fp)();
|
||||
@ -120,10 +120,7 @@ void ChatInit() {
|
||||
// with 0. Keep calling it until it returns something other than 0
|
||||
// note: the nickname may be changed if someone with that name already
|
||||
// exists (Scourge1 for instance)
|
||||
int ConnectToChatServer(char *serveraddr, char *nickname, char *trackerid) {
|
||||
int16_t chat_port;
|
||||
char chat_server[50];
|
||||
char *p;
|
||||
int ConnectToChatServer(const char *serveraddr, int16_t chat_port, char *nickname, char *trackerid) {
|
||||
char signon_str[100];
|
||||
|
||||
// if(Socket_connected && ) return -2;
|
||||
@ -141,16 +138,7 @@ int ConnectToChatServer(char *serveraddr, char *nickname, char *trackerid) {
|
||||
Chat_server_connected = 0;
|
||||
FlushChatCommandQueue();
|
||||
|
||||
p = strchr(serveraddr, ':');
|
||||
|
||||
if (nullptr == p) {
|
||||
// AfxMessageBox("Invalid chat server, must be host.com:port (ie. irc.dal.net:6667)");
|
||||
return -1;
|
||||
}
|
||||
strncpy(chat_server, serveraddr, (p - serveraddr));
|
||||
chat_server[p - serveraddr] = '\0';
|
||||
chat_port = atoi(p + 1);
|
||||
if (0 == chat_port) {
|
||||
if (chat_port == 0) {
|
||||
// AfxMessageBox("Invalid chat port, must be host.com:port (ie. irc.dal.net:6667)");
|
||||
return -1;
|
||||
}
|
||||
@ -194,18 +182,18 @@ int ConnectToChatServer(char *serveraddr, char *nickname, char *trackerid) {
|
||||
int rcode;
|
||||
uint32_t ip;
|
||||
|
||||
DLLnw_Asyncgethostbyname(&ip, NW_AGHBN_LOOKUP, chat_server);
|
||||
DLLnw_Asyncgethostbyname(&ip, NW_AGHBN_LOOKUP, serveraddr);
|
||||
do {
|
||||
rcode = DLLnw_Asyncgethostbyname(&ip, NW_AGHBN_READ, chat_server);
|
||||
rcode = DLLnw_Asyncgethostbyname(&ip, NW_AGHBN_READ, serveraddr);
|
||||
if (99 == DLLPollUI()) {
|
||||
return 0;
|
||||
}
|
||||
} while (rcode == 0);
|
||||
|
||||
if (rcode != 1) {
|
||||
DLLmprintf(0, "Unable to gethostbyname(\"%s\").\n", chat_server);
|
||||
DLLmprintf(0, "Unable to gethostbyname(\"%s\").\n", serveraddr);
|
||||
DLLmprintf(0, "WSAGetLastError() returned %d.\n", WSAGetLastError());
|
||||
DLLnw_Asyncgethostbyname(nullptr, NW_AGHBN_CANCEL, NULL);
|
||||
DLLnw_Asyncgethostbyname(nullptr, NW_AGHBN_CANCEL, nullptr);
|
||||
return 0;
|
||||
}
|
||||
memcpy(&Chataddr.sin_addr.s_addr, &ip, 4);
|
||||
|
@ -49,7 +49,7 @@ typedef struct Chat_command {
|
||||
} Chat_command;
|
||||
|
||||
// Prototypes
|
||||
int ConnectToChatServer(char *serveraddr, char *nickname, char *trackerid);
|
||||
int ConnectToChatServer(const char *serveraddr, int16_t chat_port, char *nickname, char *trackerid);
|
||||
void DisconnectFromChatServer();
|
||||
const char *GetChatText();
|
||||
char *SendChatString(char *line, int raw = 0);
|
||||
|
@ -1162,14 +1162,8 @@ int MainMultiplayerMenu() {
|
||||
// DLLNewUIWindowSetFocusOnEditGadget(send_edit,main_wnd);
|
||||
DLLmprintf(0, "About to connect...\n");
|
||||
do {
|
||||
#ifdef DEMO
|
||||
chat_connected = ConnectToChatServer("chat.parallaxonline.com:7170", pilot_name, chat_whois_info);
|
||||
#elif defined(OEM)
|
||||
chat_connected = ConnectToChatServer("chat.parallaxonline.com:7170", pilot_name, chat_whois_info);
|
||||
#else
|
||||
chat_connected = ConnectToChatServer("chat.parallaxonline.com:7170", pilot_name, chat_whois_info);
|
||||
chat_connected = ConnectToChatServer(CHATTRACKERNAME, CHATPORT, pilot_name, chat_whois_info);
|
||||
// chat_connected = ConnectToChatServer("plasma.outrage.com:7000",pilot_name,chat_whois_info);
|
||||
#endif
|
||||
p = GetChatText();
|
||||
if (p) {
|
||||
DLLUIConsoleGadgetputs(console_item, p);
|
||||
|
@ -80,6 +80,9 @@
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
// Chat tracker
|
||||
#define CHATTRACKERNAME "tracker.pxo.nottheeye.com"
|
||||
#define CHATPORT 7170
|
||||
|
||||
#define TRACKER_MENU_W 256
|
||||
#define TRACKER_MENU_H 256
|
||||
|
@ -96,8 +96,7 @@
|
||||
#pragma pack(1)
|
||||
|
||||
// Definitions
|
||||
#define GAMETRACKER "209.223.64.251" // The scanner machine at Outrage
|
||||
#define GAMETRACKERNAME "gt.parallaxonline.com"
|
||||
#define GAMETRACKERNAME "tracker.pxo.nottheeye.com"
|
||||
#define GAMEPORT 3445
|
||||
|
||||
#define MAX_GAME_BUFFERS 20 // Thats a lot considering 20 games per game_list struct
|
||||
|
@ -119,9 +119,8 @@
|
||||
#define STATE_PILOT_NOT_FOUND 6
|
||||
#define STATE_WRITE_PILOT_FAILED 7
|
||||
|
||||
#define REGTRACKER "209.223.64.250" // The scanner machine at Outrage
|
||||
#define REGPORT 2092 // The UDP port
|
||||
#define PILOTTRACKERNAME "ut.parallaxonline.com"
|
||||
#define PILOTTRACKERNAME "tracker.pxo.nottheeye.com"
|
||||
|
||||
#define PILOT_REQ_TIMEOUT 30.000
|
||||
#define PILOT_REQ_RESEND_TIME 2.0
|
||||
|
Loading…
Reference in New Issue
Block a user