Skip to content

Commit

Permalink
[Cleanup] Cleanup unused methods and variables in world/main.cpp and …
Browse files Browse the repository at this point in the history
…world/main.h (#3105)

# Notes
- These are unused.
  • Loading branch information
Kinglykrab committed Mar 17, 2023
1 parent bbdaacd commit e17fad9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
13 changes: 0 additions & 13 deletions world/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*
*/

#define PLATFORM_WORLD 1

#include "../common/global_define.h"

#include <iostream>
Expand Down Expand Up @@ -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"
Expand Down
53 changes: 0 additions & 53 deletions world/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

};

0 comments on commit e17fad9

Please sign in to comment.