From 1d131f203d5ef4c2bca106fee5309371cfda266d Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Mon, 11 Feb 2002 08:44:40 +0000 Subject: Initial import of mythserver 1.0 This is the source code for Bungie's MythII metaserver, the backend server system that supported MythII online play over the Internet for several years. The day has come for Bungie's MythII server to be retired. This source code for the server is being released so that the Myth community will have a starting point for creating their own Myth server system, should the need or desire to do so arise. PR: 34755 Submitted by: Miguel Mendez --- .../files/patch-common::authentication.c | 10 ++ games/mythserver/files/patch-common::cseries.h | 18 +++ games/mythserver/files/patch-common::platform.h | 25 ++++ .../patch-game_search_new::game_search_server.c | 12 ++ .../mythserver/files/patch-room_new::server_code.c | 10 ++ games/mythserver/files/patch-utils::environment.h | 133 +++++++++++++++++++++ 6 files changed, 208 insertions(+) create mode 100644 games/mythserver/files/patch-common::authentication.c create mode 100644 games/mythserver/files/patch-common::cseries.h create mode 100644 games/mythserver/files/patch-common::platform.h create mode 100644 games/mythserver/files/patch-game_search_new::game_search_server.c create mode 100644 games/mythserver/files/patch-room_new::server_code.c create mode 100644 games/mythserver/files/patch-utils::environment.h (limited to 'games/mythserver/files') diff --git a/games/mythserver/files/patch-common::authentication.c b/games/mythserver/files/patch-common::authentication.c new file mode 100644 index 000000000000..90bdc94acccf --- /dev/null +++ b/games/mythserver/files/patch-common::authentication.c @@ -0,0 +1,10 @@ +--- common/authentication.c.orig Sat Feb 9 15:13:18 2002 ++++ common/authentication.c Sat Feb 9 15:13:34 2002 +@@ -15,6 +15,7 @@ + #include "authentication.h" + + /* -------- code */ ++#define SERVER + + #ifdef SERVER + static authentication_token global_guest_token= {0}; diff --git a/games/mythserver/files/patch-common::cseries.h b/games/mythserver/files/patch-common::cseries.h new file mode 100644 index 000000000000..cf200a74adea --- /dev/null +++ b/games/mythserver/files/patch-common::cseries.h @@ -0,0 +1,18 @@ +--- common/cseries.h.orig Sat Feb 9 14:57:31 2002 ++++ common/cseries.h Sat Feb 9 14:57:34 2002 +@@ -70,6 +70,7 @@ + #define HIGH_WORD(n) (((n)>>16)&0xffff) + #define LOW_WORD(n) ((n)&0xffff) + ++#ifndef __FreeBSD__ + #ifdef little_endian + #define ntohl(q) (((((unsigned long) (q)))>>24) | ((((unsigned long) (q))>>8)&0xff00) | ((((unsigned long) (q))<<8)&0xff0000) | ((((unsigned long) (q))<<24)&0xff000000)) + #define htonl(q) (((((unsigned long) (q)))>>24) | ((((unsigned long) (q))>>8)&0xff00) | ((((unsigned long) (q))<<8)&0xff0000) | ((((unsigned long) (q))<<24)&0xff000000)) +@@ -81,6 +82,7 @@ + #define htonl(q) (q) + #define ntohs(q) (q) + #define htons(q) (q) ++#endif + #endif + #endif + diff --git a/games/mythserver/files/patch-common::platform.h b/games/mythserver/files/patch-common::platform.h new file mode 100644 index 000000000000..97e107ec8d38 --- /dev/null +++ b/games/mythserver/files/patch-common::platform.h @@ -0,0 +1,25 @@ +--- common/platform.h.orig Sat Feb 9 14:51:05 2002 ++++ common/platform.h Sat Feb 9 14:53:43 2002 +@@ -8,8 +8,14 @@ + macintosh + windows + playstation ++freebsd + */ + ++#if defined(__FreeBSD__) ++ #define intel // what about Alpha version? ++ #define freebsd ++#endif ++ + #if defined(__MWERKS__) // metrowerks + #if defined(__INTEL__) // intel + #define intel +@@ -64,6 +70,7 @@ + #ifdef windows + #elif defined(macintosh) + #elif defined(linux) ++#elif defined(freebsd) + #else + #error "Unknown target operating system" + #endif diff --git a/games/mythserver/files/patch-game_search_new::game_search_server.c b/games/mythserver/files/patch-game_search_new::game_search_server.c new file mode 100644 index 000000000000..1123fa723c88 --- /dev/null +++ b/games/mythserver/files/patch-game_search_new::game_search_server.c @@ -0,0 +1,12 @@ +--- game_search_new/game_search_server.c.orig Sat Feb 9 15:00:01 2002 ++++ game_search_new/game_search_server.c Sat Feb 9 15:02:05 2002 +@@ -20,7 +20,9 @@ + #include "game_search_packets.h" + #include "games_list.h" + ++#include + #include ++#include + #include + #include + #include diff --git a/games/mythserver/files/patch-room_new::server_code.c b/games/mythserver/files/patch-room_new::server_code.c new file mode 100644 index 000000000000..4acaf83d3aea --- /dev/null +++ b/games/mythserver/files/patch-room_new::server_code.c @@ -0,0 +1,10 @@ +--- room_new/server_code.c.old Sat Feb 9 15:06:52 2002 ++++ room_new/server_code.c Sat Feb 9 15:07:06 2002 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/games/mythserver/files/patch-utils::environment.h b/games/mythserver/files/patch-utils::environment.h new file mode 100644 index 000000000000..2ba37b17ffcb --- /dev/null +++ b/games/mythserver/files/patch-utils::environment.h @@ -0,0 +1,133 @@ +--- utils/environment.h.orig Sat Feb 9 15:43:33 2002 ++++ utils/environment.h Sat Feb 9 15:52:31 2002 +@@ -16,9 +16,9 @@ + + #ifdef BN2_FULLVERSION + #define BUNGIE_NET_ADMINISTRATOR "nobody" +- #define METASERVER_ROOT_DIR "C:\\WINNT" +- #define MOTD_FILE_NAME "motd" +- #define UPGRADE_PORT "-1" // obsolete ++ #define METASERVER_ROOT_DIR "/usr/local/share/mythserver" ++ #define MOTD_FILE_NAME "motd" ++ #define UPGRADE_PORT "-1" // obsolete + #ifndef USERD_HOST + #warning USERD_HOST set to + #define USERD_HOST "127.0.0.1" // +@@ -27,29 +27,29 @@ + #define USERD_ROOM_PORT "6323" + #define USERD_WEB_PORT "6322" + #define USERD_US_PORT "-1" +- #define DB_DIRECTORY "C:\\WINNT" +- #define ORDERS_DB_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define USERS_DB_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define UPDATE_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define UPDATE_DIRECTORY "C:\\WINNT\\" +- #define LOG_DIRECTORY "C:\\WINNT\\" ++ #define DB_DIRECTORY "/usr/local/share/mythserver/db/" ++ #define ORDERS_DB_FILE_NAME "orders.dat" ++ #define USERS_DB_FILE_NAME "users.dat" ++ #define UPDATE_FILE_NAME "update.dat" ++ #define UPDATE_DIRECTORY "/usr/local/share/mythserver/update/" ++ #define LOG_DIRECTORY "/usr/local/share/mythserver/log/" + #define ROOMS_LIST_FILE "rooms.lst" + #define DEFAULT_APPLE_DOUBLE_DIRECTORY ".AppleDouble" +- #define RESOURCE_DIRECTORY "System Folder" +- #define PC_APP_NAME "Myth2.exe" ++ #define RESOURCE_DIRECTORY "System Folder" ++ #define PC_APP_NAME "Myth2.exe" + #define PC_NET_ONLY_APP_NAME "obsolete" +- #define PC_UPDATE_APP_NAME "obsolete.exe" ++ #define PC_UPDATE_APP_NAME "obsolete.exe" + #define PC_NET_ONLY_UPDATE_APP_NAME "obsolete" +- #define MAC_APP_NAME "obsolete" ++ #define MAC_APP_NAME "obsolete" + #define MAC_NET_ONLY_APP_NAME "obsolete" +- #define MAC_UPDATE_APP_NAME "obsolete" ++ #define MAC_UPDATE_APP_NAME "obsolete" + #define MAC_NET_ONLY_UPDATE_APP_NAME "obsolete" + #define PATCH_FILE_NAME "obsolete" + #define ADMIN_LOG_FILE_NAME "adminlog.txt" + #define UPDATE_SERVER_STATS_FILE_PATH "./" + #elif defined(BN2_DEMOVERSION) + #define BUNGIE_NET_ADMINISTRATOR "nobody" +- #define METASERVER_ROOT_DIR "C:\\WINNT" ++ #define METASERVER_ROOT_DIR "/usr/local/share/mythserver" + #define MOTD_FILE_NAME "motd" + #define UPGRADE_PORT "-1" // obsolete + #ifndef USERD_HOST +@@ -60,44 +60,44 @@ + #define USERD_ROOM_PORT "6333" + #define USERD_WEB_PORT "6332" + #define USERD_US_PORT "6334" +- #define DB_DIRECTORY "C:\\WINNT" +- #define ORDERS_DB_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define USERS_DB_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define UPDATE_FILE_NAME "C:\\WINNT\\explorer.exe" +- #define UPDATE_DIRECTORY "C:\\WINNT\\" +- #define LOG_DIRECTORY "C:\\WINNT\\" ++ #define DB_DIRECTORY "/usr/local/share/mythserver/db" ++ #define ORDERS_DB_FILE_NAME "orders.dat" ++ #define USERS_DB_FILE_NAME "users.dat" ++ #define UPDATE_FILE_NAME "update.dat" ++ #define UPDATE_DIRECTORY "/usr/local/share/mythserver/update/" ++ #define LOG_DIRECTORY "/usr/local/share/mythserver/log/" + #define ROOMS_LIST_FILE "rooms.lst" + #define DEFAULT_APPLE_DOUBLE_DIRECTORY ".AppleDouble" +- #define RESOURCE_DIRECTORY "System Folder" +- #define PC_APP_NAME "Myth2.exe" +- #define PC_NET_ONLY_APP_NAME "obsolete" +- #define PC_UPDATE_APP_NAME "obsolete.exe" +- #define PC_NET_ONLY_UPDATE_APP_NAME "obsolete" +- #define MAC_APP_NAME "obsolete" +- #define MAC_NET_ONLY_APP_NAME "obsolete" +- #define MAC_UPDATE_APP_NAME "obsolete" ++ #define RESOURCE_DIRECTORY "System Folder" ++ #define PC_APP_NAME "Myth2.exe" ++ #define PC_NET_ONLY_APP_NAME "obsolete" ++ #define PC_UPDATE_APP_NAME "obsolete.exe" ++ #define PC_NET_ONLY_UPDATE_APP_NAME "obsolete" ++ #define MAC_APP_NAME "obsolete" ++ #define MAC_NET_ONLY_APP_NAME "obsolete" ++ #define MAC_UPDATE_APP_NAME "obsolete" + #define MAC_NET_ONLY_UPDATE_APP_NAME "obsolete" +- #define PATCH_FILE_NAME "obsolete" +- #define ADMIN_LOG_FILE_NAME "adminlog.txt" ++ #define PATCH_FILE_NAME "obsolete" ++ #define ADMIN_LOG_FILE_NAME "adminlog.txt" + #define UPDATE_SERVER_STATS_FILE_PATH "./" + #endif + + #define get_bungie_net_administrator() BUNGIE_NET_ADMINISTRATOR +- #define get_metaserver_root_dir() METASERVER_ROOT_DIR +- #define get_motd_file_name() MOTD_FILE_NAME +- #define get_upgrade_port() UPGRADE_PORT +- #define get_userd_host() USERD_HOST +- #define get_userd_port() USERD_PORT +- #define get_userd_room_port() USERD_ROOM_PORT +- #define get_userd_web_port() USERD_WEB_PORT +- #define get_userd_us_port() USERD_US_PORT +- #define get_db_directory() DB_DIRECTORY +- #define get_orders_db_file_name() ORDERS_DB_FILE_NAME +- #define get_users_db_file_name() USERS_DB_FILE_NAME +- #define get_update_file_name() UPDATE_FILE_NAME +- #define get_update_directory() UPDATE_DIRECTORY +- #define get_log_directory() LOG_DIRECTORY +- #define get_rooms_list_file() ROOMS_LIST_FILE ++ #define get_metaserver_root_dir() METASERVER_ROOT_DIR ++ #define get_motd_file_name() MOTD_FILE_NAME ++ #define get_upgrade_port() UPGRADE_PORT ++ #define get_userd_host() USERD_HOST ++ #define get_userd_port() USERD_PORT ++ #define get_userd_room_port() USERD_ROOM_PORT ++ #define get_userd_web_port() USERD_WEB_PORT ++ #define get_userd_us_port() USERD_US_PORT ++ #define get_db_directory() DB_DIRECTORY ++ #define get_orders_db_file_name() ORDERS_DB_FILE_NAME ++ #define get_users_db_file_name() USERS_DB_FILE_NAME ++ #define get_update_file_name() UPDATE_FILE_NAME ++ #define get_update_directory() UPDATE_DIRECTORY ++ #define get_log_directory() LOG_DIRECTORY ++ #define get_rooms_list_file() ROOMS_LIST_FILE + #define get_default_apple_double_directory() DEFAULT_APPLE_DOUBLE_DIRECTORY + #define get_resource_directory() RESOURCE_DIRECTORY + #define get_pc_app_name() PC_APP_NAME -- cgit v1.2.3