| 1 | /* |
| 2 | * Copyright (C) 2000,2001 Onlyer ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | #ifndef INCLUDED_D2CS_SETUP_H |
| 19 | #define INCLUDED_D2CS_SETUP_Hcxx . . $ `src/d2cs/setup.h:19:9`! |
| 20 | |
| 21 | #define tfcxx . . $ `src/d2cs/setup.h:21:9`!(a) ((a)?1:0) |
| 22 | |
| 23 | #define strcmp_charnamecxx . . $ `src/d2cs/setup.h:23:9`! strcasecmp |
| 24 | #define strncmp_charnamecxx . . $ `src/d2cs/setup.h:24:9`! strncasencmp |
| 25 | |
| 26 | #define BEGIN_LIST_TRAVERSE_DATAcxx . . $ `src/d2cs/setup.h:26:9`!(list,data,type) \ |
| 27 | {\ |
| 28 | t_elem * curr_elem_; \ |
| 29 | for (curr_elem_ = list_get_first(list); curr_elem_ && (data = (type*)elem_get_data(curr_elem_)); \ |
| 30 | curr_elem_ = elem_get_next(list, curr_elem_)) |
| 31 | |
| 32 | #define END_LIST_TRAVERSE_DATAcxx . . $ `src/d2cs/setup.h:32:9`!() \ |
| 33 | } |
| 34 | |
| 35 | #define BEGIN_LIST_TRAVERSE_DATA_CONSTcxx . . $ `src/d2cs/setup.h:35:9`!(list,data,type)\ |
| 36 | {\ |
| 37 | t_elem const * curr_elem_; \ |
| 38 | for (curr_elem_ = list_get_first_const(list); curr_elem_ && (data = (type*)elem_get_data(curr_elem_)); \ |
| 39 | curr_elem_ = elem_get_next_const(list, curr_elem_)) |
| 40 | |
| 41 | #define END_LIST_TRAVERSE_DATA_CONSTcxx . . $ `src/d2cs/setup.h:41:9`!() \ |
| 42 | } |
| 43 | |
| 44 | #define BEGIN_HASHTABLE_TRAVERSE_DATAcxx . . $ `src/d2cs/setup.h:44:9`!(hashtable,data,type)\ |
| 45 | {\ |
| 46 | t_entry * curr_entry_; \ |
| 47 | for (curr_entry_ = hashtable_get_first(hashtable); curr_entry_ && (data = (type*)entry_get_data(curr_entry_)); \ |
| 48 | curr_entry_ = entry_get_next(curr_entry_)) |
| 49 | |
| 50 | #define END_HASHTABLE_TRAVERSE_DATAcxx . . $ `src/d2cs/setup.h:50:9`!() \ |
| 51 | } |
| 52 | |
| 53 | #define BEGIN_HASHTABLE_TRAVERSE_MATCHING_DATAcxx . . $ `src/d2cs/setup.h:53:9`!(hashtable,data,hash,type)\ |
| 54 | {\ |
| 55 | t_entry * curr_entry_; \ |
| 56 | for (curr_entry_ = hashtable_get_first_matching(hashtable, hash); \ |
| 57 | curr_entry_ && (data = (type*)entry_get_data(curr_entry_)); \ |
| 58 | curr_entry_ = entry_get_next_matching(curr_entry_)) |
| 59 | |
| 60 | #define END_HASHTABLE_TRAVERSE_DATAcxx . . $ `src/d2cs/setup.h:60:9`!() \ |
| 61 | } |
| 62 | |
| 63 | #define CASEcxx . . $ `src/d2cs/setup.h:63:9`!(condition,func) case condition:\ |
| 64 | func; \ |
| 65 | break; \ |
| 66 | |
| 67 | #define ASSERTcxx . . $ `src/d2cs/setup.h:67:9`!(var,retval) if (!var) { eventlog(eventlog_level_error,__FUNCTION__,"got NULL " #var); return retval; } |
| 68 | #define DECLARE_PACKET_HANDLERcxx . . $ `src/d2cs/setup.h:68:9`!(handler) static int handler(t_connection *, t_packet *); |
| 69 | #define NELEMScxx . . $ `src/d2cs/setup.h:69:9`!(s) sizeof(s)/sizeof(s[0]) |
| 70 | |
| 71 | #define MAX_SAVEFILE_SIZEcxx . . $ `src/d2cs/setup.h:71:9`! 32 * 1024 |
| 72 | #define MAX_CHAR_PER_GAMEcxx . . $ `src/d2cs/setup.h:72:9`! 8 |
| 73 | #define D2CS_SERVER_PORTcxx . . $ `src/d2cs/setup.h:73:9`! 6113 |
| 74 | #define MAX_GAME_IDLE_TIMEcxx . . $ `src/d2cs/setup.h:74:9`! 0 |
| 75 | #define DEFAULT_S2S_RETRYINTERVALcxx . . $ `src/d2cs/setup.h:75:9`! 60 |
| 76 | #define DEFAULT_S2S_TIMEOUTcxx . . $ `src/d2cs/setup.h:76:9`! 60 |
| 77 | #define DEFAULT_SQ_CHECKINTERVALcxx . . $ `src/d2cs/setup.h:77:9`! 300 |
| 78 | #define DEFAULT_SQ_TIMEOUTcxx . . $ `src/d2cs/setup.h:78:9`! 300 |
| 79 | #define DEFAULT_REALM_NAMEcxx . . $ `src/d2cs/setup.h:79:9`! "D2CS" |
| 80 | #define DEFAULT_SHUTDOWN_DELAYcxx . . $ `src/d2cs/setup.h:80:9`! 300 |
| 81 | #define DEFAULT_SHUTDOWN_DECRcxx . . $ `src/d2cs/setup.h:81:9`! 60 |
| 82 | #define DEFAULT_S2S_IDLETIMEcxx . . $ `src/d2cs/setup.h:82:9`! 300 |
| 83 | #define DEFAULT_S2S_KEEPALIVE_INTERVALcxx . . $ `src/d2cs/setup.h:83:9`! 60 |
| 84 | #define DEFAULT_TIMEOUT_CHECKINTERVALcxx . . $ `src/d2cs/setup.h:84:9`! 60 |
| 85 | #define DEFAULT_ACC_ALLOWED_SYMBOLScxx . . $ `src/d2cs/setup.h:85:9`! "-_[]" |
| 86 | #define DEFAULT_D2GS_RESTART_DELAYcxx . . $ `src/d2cs/setup.h:86:9`! 300 |
| 87 | |
| 88 | #define MAJOR_VERSION_EQUALcxx . . $ `src/d2cs/setup.h:88:9`!(v1,v2,mask) (((v1) & (mask)) == ((v2) & (mask))) |
| 89 | |
| 90 | |
| 91 | #ifndef D2CS_DEFAULT_CONF_FILEcxx . . $ `build/config.h:89:9`! |
| 92 | # define D2CS_DEFAULT_CONF_FILE "conf/d2cs.conf" |
| 93 | #endif |
| 94 | |
| 95 | #define DEFAULT_LOG_FILEcxx . . $ `src/d2cs/setup.h:95:9`! "/usr/local/var/d2cs.std::log" |
| 96 | #define DEFAULT_LOG_LEVELScxx . . $ `src/d2cs/setup.h:96:9`! "info,warn,error" |
| 97 | #define DEFAULT_MEMLOG_FILEcxx . . $ `src/d2cs/setup.h:97:9`! "/tmp/d2cs-mem.std::log" |
| 98 | |
| 99 | #define D2CS_SERVER_ADDRScxx . . $ `src/d2cs/setup.h:99:9`! "0.0.0.0" |
| 100 | #define D2GS_SERVER_LISTcxx . . $ `src/d2cs/setup.h:100:9`! "192.168.0.1" |
| 101 | #define BNETD_SERVER_LISTcxx . . $ `src/d2cs/setup.h:101:9`! "192.168.0.1" |
| 102 | #define MAX_D2GAME_NUMBERcxx . . $ `src/d2cs/setup.h:102:9`! 30 |
| 103 | #define MAX_CHAR_PER_ACCTcxx . . $ `src/d2cs/setup.h:103:9`! 8 |
| 104 | // MAX_MAX_CHAR_PER_ACCT is needed cause D2 client can at worst case only handle 18 chars |
| 105 | #define MAX_MAX_CHAR_PER_ACCTcxx . . $ `src/d2cs/setup.h:105:9`! 18 |
| 106 | #define MAX_CLIENT_IDLETIMEcxx . . $ `src/d2cs/setup.h:106:9`! 30 * 60 |
| 107 | |
| 108 | #define D2CS_CHARINFO_DIRcxx . . $ `src/d2cs/setup.h:108:9`! "/usr/local/var/charinfo" |
| 109 | #define D2CS_CHARSAVE_DIRcxx . . $ `src/d2cs/setup.h:109:9`! "/usr/local/var/charsave" |
| 110 | #define D2CS_BAK_CHARINFO_DIRcxx . . $ `src/d2cs/setup.h:110:9`! "/usr/local/var/bak/charinfo" |
| 111 | #define D2CS_BAK_CHARSAVE_DIRcxx . . $ `src/d2cs/setup.h:111:9`! "/usr/local/var/bak/charsave" |
| 112 | #define D2CS_CHARSAVE_NEWBIEcxx . . $ `src/d2cs/setup.h:112:9`! "/usr/local/var/files/newbie.save" |
| 113 | #define D2CS_TRANS_FILEcxx . . $ `src/d2cs/setup.h:113:9`! "/usr/local/etc/address_translation.conf" |
| 114 | #define D2CS_LADDER_DIRcxx . . $ `src/d2cs/setup.h:114:9`! "/usr/local/var/ladders" |
| 115 | |
| 116 | #define D2CS_MOTDcxx . . $ `src/d2cs/setup.h:116:9`! "No MOTD yet" |
| 117 | |
| 118 | #define LIST_PURGE_INTERVALcxx . . $ `src/d2cs/setup.h:118:9`! 300 |
| 119 | #define GAMEQUEUE_CHECK_INTERVALcxx . . $ `src/d2cs/setup.h:119:9`! 60 |
| 120 | |
| 121 | #define MAX_GAME_LISTcxx . . $ `src/d2cs/setup.h:121:9`! 20 |
| 122 | |
| 123 | #endif |