From e17fad9ae0d6d8e71e9511da9aa7df476007682e Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Fri, 17 Mar 2023 06:22:41 -0400 Subject: [PATCH] [Cleanup] Cleanup unused methods and variables in world/main.cpp and world/main.h (#3105) # Notes - These are unused. --- world/main.cpp | 13 ------------- world/main.h | 53 -------------------------------------------------- 2 files changed, 66 deletions(-) diff --git a/world/main.cpp b/world/main.cpp index de97693d8..a01c57ed1 100644 --- a/world/main.cpp +++ b/world/main.cpp @@ -18,8 +18,6 @@ * */ -#define PLATFORM_WORLD 1 - #include "../common/global_define.h" #include @@ -56,20 +54,9 @@ #include #else -#include "../common/unix.h" #include #include -#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" diff --git a/world/main.h b/world/main.h index 06e918a5c..55c1fa8e9 100644 --- a/world/main.h +++ b/world/main.h @@ -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; - -};