// initialize int inter_init_sql(const char *file) { //int i; inter_config_read(file); //DB connection initialized sql_handle = Sql_Malloc(); ShowInfo(read_message("Source.char.inter_init_sql")); if(SQL_ERROR == Sql_Connect(sql_handle, char_server_id, char_server_pw, char_server_ip, (uint16)char_server_port, char_server_db)) { Sql_ShowDebug(sql_handle); Sql_Free(sql_handle); exit(EXIT_FAILURE); } if(*default_codepage) { if(SQL_ERROR == Sql_SetEncoding(sql_handle, default_codepage)) Sql_ShowDebug(sql_handle); } wis_db = idb_alloc(DB_OPT_RELEASE_DATA); inter_guild_sql_init(); inter_storage_sql_init(); inter_party_sql_init(); inter_pet_sql_init(); inter_homunculus_sql_init(); inter_mercenary_sql_init(); inter_elemental_sql_init(); inter_mail_sql_init(); inter_auction_sql_init(); geoip_readdb(); msg_config_read("conf/messages.conf", false); return 0; }
// initialize int inter_init_sql (const char *file) { inter_config_read (file); //DB connection initialized sql_handle = Sql_Malloc(); ShowInfo ("Conectando à DB de chars.... (Character Server)\n"); if (SQL_ERROR == Sql_Connect (sql_handle, char_server_id, char_server_pw, char_server_ip, (uint16) char_server_port, char_server_db)) { Sql_ShowDebug (sql_handle); Sql_Free (sql_handle); exit (EXIT_FAILURE); } if (*default_codepage) { if (SQL_ERROR == Sql_SetEncoding (sql_handle, default_codepage)) Sql_ShowDebug (sql_handle); } ShowStatus ("Conectado ao banco de dados principal '"CL_WHITE"%s"CL_RESET"'.\n", char_server_db); Sql_PrintExtendedInfo (sql_handle); wis_db = idb_alloc (DB_OPT_RELEASE_DATA); inter_guild_sql_init(); inter_storage_sql_init(); inter_party_sql_init(); inter_pet_sql_init(); inter_homunculus_sql_init(); inter_mercenary_sql_init(); inter_elemental_sql_init(); inter_accreg_sql_init(); inter_mail_sql_init(); inter_auction_sql_init(); geoip_readdb(); msg_config_read ("conf/msg_athena.conf"); return 0; }
// initialize int inter_init_sql(const char *file) { inter_config_defaults(); inter_config_read(file); //DB connection initialized sql_handle = Sql_Malloc(); ShowInfo("Connect Character DB server.... (Character Server)\n"); if( SQL_ERROR == Sql_Connect(sql_handle, char_server_id, char_server_pw, char_server_ip, (uint16)char_server_port, char_server_db) ) { ShowError("Couldn't connect with username = '******', password = '******', host = '%s', port = '%d', database = '%s'\n", char_server_id, char_server_pw, char_server_ip, char_server_port, char_server_db); Sql_ShowDebug(sql_handle); Sql_Free(sql_handle); exit(EXIT_FAILURE); } if( *default_codepage ) { if( SQL_ERROR == Sql_SetEncoding(sql_handle, default_codepage) ) Sql_ShowDebug(sql_handle); } wis_db = idb_alloc(DB_OPT_RELEASE_DATA); inter_config_readConf(); inter_guild_sql_init(); inter_storage_sql_init(); inter_party_sql_init(); inter_pet_sql_init(); inter_homunculus_sql_init(); inter_mercenary_sql_init(); inter_elemental_sql_init(); inter_mail_sql_init(); inter_auction_sql_init(); inter_clan_init(); geoip_readdb(); return 0; }
// initialize int inter_init_sql(const char *file) { //int i; ShowInfo ("interserver initialize...\n"); inter_config_read(file); //DB connection initialized sql_handle = Sql_Malloc(); ShowInfo("Connect Character DB server.... (Character Server)\n"); if( SQL_ERROR == Sql_Connect(sql_handle, char_server_id, char_server_pw, char_server_ip, (uint16)char_server_port, char_server_db) ) { Sql_ShowDebug(sql_handle); Sql_Free(sql_handle); exit(EXIT_FAILURE); } if( *default_codepage ) { if( SQL_ERROR == Sql_SetEncoding(sql_handle, default_codepage) ) Sql_ShowDebug(sql_handle); } wis_db = idb_alloc(DB_OPT_RELEASE_DATA); inter_guild_sql_init(); inter_storage_sql_init(); inter_party_sql_init(); inter_pet_sql_init(); inter_homunculus_sql_init(); inter_mercenary_sql_init(); inter_elemental_sql_init(); inter_accreg_sql_init(); inter_mail_sql_init(); inter_auction_sql_init(); geoip_readdb(); msg_config_read("conf/msg_athena.conf"); return 0; }