From f9ca4759d3dab9515bc3c1cb9b7e2bac97d1f71f Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Wed, 13 Oct 2010 13:19:40 +0200 Subject: Hiding Manaserv from the player on TMW-Athena only release With the preprocessor definition MANASERV_SUPPORT the manaserv support is avaible as before. * Removing server type from server dialog GUI. * Ignoring Manaserv entries in serverlist.xml. * In order not to lose Manaserv CustomServers from the config.xml, they get stored in mManaservServers. * The entries in mManaservServers are saved in config.xml again. But they are now behind the TMWA-Athena servers. * For custom server the GUI sets 6901 as default value for port. * If the server type is unknown, then we use TMW-Athena. This is relevant, if the client is started with command line options for server. Reviewed-by: Bertram --- src/net/net.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net/net.cpp') diff --git a/src/net/net.cpp b/src/net/net.cpp index 7e7395a6..25dcd981 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -134,12 +134,16 @@ void connectToServer(ServerInfo &server) // TODO: Query the server about itself and choose the netcode based on // that +#ifndef MANASERV_SUPPORT + server.type = ServerInfo::TMWATHENA; +#else if (server.port == 6901) server.type = ServerInfo::TMWATHENA; else if (server.port == 9601) server.type = ServerInfo::MANASERV; else logger->error(_("Unknown Server Type! Exiting.")); +#endif } if (networkType == server.type && getGeneralHandler() != NULL) -- cgit v1.2.3-70-g09d2