[Cleanup] Cleanup unused methods and variables in world/main.cpp and world/main.h (#3105)

# Notes
- These are unused.
This commit is contained in:
Alex King 2023-03-17 06:22:41 -04:00 committed by GitHub
parent bbdaacd3b0
commit e17fad9ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 66 deletions

View File

@ -18,8 +18,6 @@
*
*/
#define PLATFORM_WORLD 1
#include "../common/global_define.h"
#include <iostream>
@ -56,20 +54,9 @@
#include <conio.h>
#else
#include "../common/unix.h"
#include <sys/sem.h>
#include <thread>
#if not defined (FREEBSD) && not defined (DARWIN)
union semun {
int val;
struct semid_ds *buf;
ushort *array;
struct seminfo *__buf;
void *__pad;
};
#endif
#endif
#include "../common/patches/patches.h"

View File

@ -32,56 +32,3 @@
void CatchSignal(int sig_num);
#define EQ_WORLD_PORT 9000 //mandated by the client
#define LOGIN_PORT 5997
class NetConnection
{
public:
NetConnection() {
world_locked = false;
for (int i=0; i<5; i++) {
memset(loginaddress[i], 0, sizeof(loginaddress[i]));
loginport[i] = LOGIN_PORT;
}
memset(worldname, 0, sizeof(worldname));
memset(worldshortname, 0, sizeof(worldshortname));
memset(worldaccount, 0, sizeof(worldaccount));
memset(worldpassword, 0, sizeof(worldpassword));
memset(worldaddress, 0, sizeof(worldaddress));
memset(chataddress, 0, sizeof(chataddress));
DEFAULTSTATUS=0;
LoginServerInfo = 0;//ReadLoginINI();
UpdateStats = false;
}
~NetConnection() { }
bool ReadLoginINI();
bool LoginServerInfo;
bool UpdateStats;
char* GetLoginInfo(uint16* oPort);
inline char* GetLoginAddress(uint8 i) { return loginaddress[i]; }
inline uint16 GetLoginPort(uint8 i) { return loginport[i]; }
inline char* GetWorldName() { return worldname; }
inline char* GetWorldShortName() { return worldshortname; }
inline char* GetWorldAccount() { return worldaccount; }
inline char* GetWorldPassword() { return worldpassword; }
inline char* GetWorldAddress() { return worldaddress; }
inline uint8 GetDefaultStatus() { return DEFAULTSTATUS; }
inline char* GetChatAddress() { return chataddress; }
uint16 GetChatPort() { return chatport; }
bool world_locked;
private:
int listening_socket;
char loginaddress[5][255];
uint16 loginport[5];
uint16 chatport;
char worldname[201];
char worldshortname[31];
char worldaccount[31];
char worldpassword[31];
char worldaddress[255];
char chataddress[255];
uint8 DEFAULTSTATUS;
};