|
@@ -128,13 +128,6 @@ MYSQL charsql_handle;
|
|
|
MYSQL_RES* charsql_res;
|
|
|
MYSQL_ROW charsql_row;
|
|
|
|
|
|
-#ifdef MAPREGSQL
|
|
|
-// [zBuffer] SQL Mapreg
|
|
|
-MYSQL mapregsql_handle;
|
|
|
-MYSQL_RES* mapregsql_res ;
|
|
|
-MYSQL_ROW mapregsql_row;
|
|
|
-#endif
|
|
|
-
|
|
|
#endif /* not TXT_ONLY */
|
|
|
|
|
|
int lowest_gm_level = 1;
|
|
@@ -3539,26 +3532,6 @@ int map_sql_init(void){
|
|
|
ShowStatus ("connect success! (Login Server Connection)\n");
|
|
|
}
|
|
|
|
|
|
-#ifdef MAPREGSQL
|
|
|
- // [zBuffer] SQL Mapreg connection start
|
|
|
- ShowInfo("Connect Mapreg DB Server....\n");
|
|
|
- mysql_init(&mapregsql_handle);
|
|
|
- if(!mysql_real_connect(&mapregsql_handle, map_server_ip, map_server_id, map_server_pw,
|
|
|
- map_server_db ,map_server_port, (char *)NULL, 0)) {
|
|
|
- //pointer check
|
|
|
- ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
|
|
|
- exit(1);
|
|
|
- } else {
|
|
|
- ShowStatus ("Connect success! (Mapreg DB Connection)\n");
|
|
|
- if( strlen(default_codepage) > 0 ) {
|
|
|
- sprintf( tmp_sql, "SET NAMES %s", default_codepage );
|
|
|
- if (mysql_query(&mapregsql_handle, tmp_sql)) {
|
|
|
- ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
|
|
|
- ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-#endif
|
|
|
if(mail_server_enable) { // mail system [Valaris]
|
|
|
mysql_init(&mail_handle);
|
|
|
ShowInfo("Connecting to the Mail DB Server....\n");
|
|
@@ -3596,12 +3569,6 @@ int map_sql_close(void){
|
|
|
mysql_close(&lmysql_handle);
|
|
|
ShowStatus("Close Login DB Connection....\n");
|
|
|
|
|
|
-#ifdef MAPREGSQL
|
|
|
- // [zBuffer] SQL Mapreg connection stop
|
|
|
- mysql_close(&mapregsql_handle);
|
|
|
- ShowStatus("Close Mapreg DB Connection....\n");
|
|
|
-#endif
|
|
|
-
|
|
|
if (log_config.sql_logs)
|
|
|
//Updating this if each time there's a log_config addition is too much of a hassle. [Skotlex]
|
|
|
/*&& (log_config.branch || log_config.drop || log_config.mvpdrop ||
|