fix a lot of issues on psogc; add proxy module
- $ann implemented - concurrency removed; server is now single-threaded, event-driven and much more stable - rare seed is no longer the game id; ids are sequential from server startup so they weren't random at all before - supports dropping privileges; now you can run it as root so it can open a sockets on low ports, then it will switch to the given user before serving any traffic - newserv now behaves like a proxy if you run it with the --proxy-destination=<IP_OR_HOSTNAME> argument; there's also an (invisible) shell in this mode where you can inject commands to the server or client. e.g. it can always be christmas in the lobby if you do `sc DA 01 00 00` - increased the mtu on PSODolphinConfig's tap0 configuration; this seems to make the connection more stable - fixed some uninitialized memory bugs - the shell is now event-driven and now uses libevent too; unfortunately this means readline doesn't work anymore (no history and vim-like shortcuts) - made network command display consistent for input vs. output (the header appears in both cases now) - fixed bugs in some subcommand handling (the BB logic was being applied to non-BB clients erroneously, causing most item drops not to work at all) - fixed player tags in the short lobby data struct. unclear if this was actually a problem but it was inconsistent with other servers - fixed "unused" field in game join command (actually it appears to be disable_udp and should be 1, not 0) - cleaned up Server abstraction a bit - rewrote some text functions; asan was complaining about the built-in ones for some reason - added an optional welcome message
This commit is contained in:
@@ -24,8 +24,6 @@ enum LobbyFlag {
|
||||
};
|
||||
|
||||
struct Lobby {
|
||||
mutable rw_lock lock;
|
||||
|
||||
uint32_t lobby_id;
|
||||
|
||||
uint32_t min_level;
|
||||
@@ -46,8 +44,9 @@ struct Lobby {
|
||||
uint8_t episode;
|
||||
uint8_t difficulty;
|
||||
uint8_t mode;
|
||||
char16_t password[36];
|
||||
char16_t name[36];
|
||||
char16_t password[0x24];
|
||||
char16_t name[0x24];
|
||||
uint32_t rare_seed;
|
||||
|
||||
//EP3_GAME_CONFIG* ep3; // only present if this is an Episode 3 game
|
||||
|
||||
@@ -65,15 +64,12 @@ struct Lobby {
|
||||
|
||||
bool is_game() const;
|
||||
|
||||
void reassign_leader_on_client_departure_locked(size_t leaving_client_id);
|
||||
void reassign_leader_on_client_departure(size_t leaving_client_id);
|
||||
size_t count_clients() const;
|
||||
size_t count_clients_locked() const;
|
||||
bool any_client_loading() const;
|
||||
|
||||
void add_client(std::shared_ptr<Client> c);
|
||||
void add_client_locked(std::shared_ptr<Client> c);
|
||||
void remove_client(std::shared_ptr<Client> c);
|
||||
void remove_client_locked(std::shared_ptr<Client> c);
|
||||
|
||||
void move_client_to_lobby(std::shared_ptr<Lobby> dest_lobby,
|
||||
std::shared_ptr<Client> c);
|
||||
|
||||
Reference in New Issue
Block a user