summaryrefslogtreecommitdiff
path: root/src/txt-converter
diff options
context:
space:
mode:
Diffstat (limited to 'src/txt-converter')
-rw-r--r--src/txt-converter/CMakeLists.txt17
-rw-r--r--src/txt-converter/Makefile.in150
-rw-r--r--src/txt-converter/char-converter.c303
-rw-r--r--src/txt-converter/char/CMakeLists.txt76
-rw-r--r--src/txt-converter/login-converter.c108
-rw-r--r--src/txt-converter/login/CMakeLists.txt60
6 files changed, 0 insertions, 714 deletions
diff --git a/src/txt-converter/CMakeLists.txt b/src/txt-converter/CMakeLists.txt
deleted file mode 100644
index 7b1cfb6a8..000000000
--- a/src/txt-converter/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#
-# setup
-#
-set( CONVERTER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-if( WITH_MYSQL )
- option( BUILD_CONVERTERS "build converter executables" OFF )
-else()
- message( STATUS "Disabled converter targets (requires MYSQL)" )
-endif()
-
-
-#
-# targets
-#
-add_subdirectory( login )
-add_subdirectory( char )
diff --git a/src/txt-converter/Makefile.in b/src/txt-converter/Makefile.in
deleted file mode 100644
index 50e89e34e..000000000
--- a/src/txt-converter/Makefile.in
+++ /dev/null
@@ -1,150 +0,0 @@
-LOGIN_CONVERTER_OBJ = \
- obj_login/login-converter.o \
- ../login/obj_txt/account_txt.o \
- ../login/obj_sql/account_sql.o \
- ../common/obj_all/minicore.o \
- ../common/obj_all/db.o \
- ../common/obj_all/ers.o \
- ../common/obj_all/lock.o \
- ../common/obj_all/malloc.o \
- ../common/obj_all/showmsg.o \
- ../common/obj_all/strlib.o \
- ../common/obj_all/timer.o \
- ../common/obj_all/utils.o \
- ../common/obj_sql/sql.o
-LOGIN_CONVERTER_H = \
- ../login/account.h \
- ../common/cbasetypes.h \
- ../common/mmo.h \
- ../common/core.h \
- ../common/db.h \
- ../common/ers.h \
- ../common/lock.h \
- ../common/malloc.h \
- ../common/showmsg.h \
- ../common/strlib.h \
- ../common/timer.h \
- ../common/utils.h \
- ../common/sql.h
-
-CHAR_CONVERTER_OBJ = \
- obj_char/char-converter.o \
- obj_char/txt-char.o \
- obj_char/txt-int_pet.o \
- obj_char/txt-int_storage.o \
- obj_char/txt-inter.o \
- obj_char/txt-int_party.o \
- obj_char/txt-int_guild.o \
- obj_char/sql-char.o \
- obj_char/sql-int_pet.o \
- obj_char/sql-int_storage.o \
- obj_char/sql-inter.o \
- obj_char/sql-int_party.o \
- obj_char/sql-int_guild.o \
- obj_char/sql-int_mercenary.o \
- ../common/obj_all/minicore.o \
- ../common/obj_all/malloc.o \
- ../common/obj_all/strlib.o \
- ../common/obj_all/showmsg.o \
- ../common/obj_all/utils.o \
- ../common/obj_all/timer.o \
- ../common/obj_all/ers.o \
- ../common/obj_all/mapindex.o \
- ../common/obj_sql/sql.o
-
-CHAR_CONVERTER_H = \
- ../char/char.h \
- ../char/int_pet.h \
- ../char/int_storage.h \
- ../char/inter.h \
- ../char/int_party.h \
- ../char/int_guild.h \
- ../char_sql/char.h \
- ../char_sql/int_pet.h \
- ../char_sql/int_storage.h \
- ../char_sql/inter.h \
- ../char_sql/int_party.h \
- ../char_sql/int_guild.h \
- ../char_sql/int_mercenary.h \
- ../common/cbasetypes.h \
- ../common/mmo.h \
- ../common/core.h \
- ../common/malloc.h \
- ../common/strlib.h \
- ../common/showmsg.h \
- ../common/timer.h \
- ../common/utils.h \
- ../common/ers.h \
- ../common/mapindex.h \
- ../common/sql.h
-
-HAVE_MYSQL=@HAVE_MYSQL@
-ifeq ($(HAVE_MYSQL),yes)
- LOGIN_CONVERTER_DEPENDS=obj_login $(LOGIN_CONVERTER_OBJ)
- CHAR_CONVERTER_DEPENDS=obj_char $(CHAR_CONVERTER_OBJ)
-else
- LOGIN_CONVERTER_DEPENDS=needs_mysql
- CHAR_CONVERTER_DEPENDS=needs_mysql
-endif
-
-@SET_MAKE@
-
-#####################################################################
-.PHONY : all login-converter char-converter clean help
-
-all: login-converter char-converter
-
-login-converter: $(LOGIN_CONVERTER_DEPENDS)
- @CC@ @LDFLAGS@ -o ../../tools/login-converter@EXEEXT@ $(LOGIN_CONVERTER_OBJ) @LIBS@ @MYSQL_LIBS@
-
-char-converter: $(CHAR_CONVERTER_DEPENDS)
- @CC@ @LDFLAGS@ -o ../../tools/char-converter@EXEEXT@ $(CHAR_CONVERTER_OBJ) @LIBS@ @MYSQL_LIBS@
-
-clean:
- rm -rf *.o obj_login obj_char ../../tools/login-converter@EXEEXT@ ../../tools/char-converter@EXEEXT@
-
-help:
- @echo "possible targets are 'login-converter' 'char-converter' 'all' 'clean' 'help'"
- @echo "'login-converter' - login server converter"
- @echo "'char-converter' - char server converter"
- @echo "'all' - builds all above targets"
- @echo "'clean' - cleans builds and objects"
- @echo "'help' - outputs this message"
-
-#####################################################################
-
-needs_mysql:
- @echo "MySQL not found or disabled by the configure script"
- @exit 1
-
-obj_login:
- -mkdir obj_login
-
-obj_char:
- -mkdir obj_char
-
-obj_login/%.o: %.c $(LOGIN_CONVERTER_H)
- @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DWITH_TXT -DWITH_SQL -c $(OUTPUT_OPTION) $<
-
-obj_char/%.o: %.c $(CHAR_CONVERTER_H)
- @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-
-obj_char/txt-%.o: ../char/%.c $(CHAR_CONVERTER_H)
- @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-
-obj_char/sql-%.o: ../char_sql/%.c $(CHAR_CONVERTER_H)
- @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-
-# missing common object files
-../common/obj_all/%.o:
- @$(MAKE) -C ../common sql
-
-../common/obj_sql/%.o:
- @$(MAKE) -C ../common sql
-
-# missing login server files
-../login/obj_txt/%.o:
- @$(MAKE) -C ../login txt
-
-../login/obj_sql/%.o:
- @$(MAKE) -C ../login sql
diff --git a/src/txt-converter/char-converter.c b/src/txt-converter/char-converter.c
deleted file mode 100644
index 0d6ecea25..000000000
--- a/src/txt-converter/char-converter.c
+++ /dev/null
@@ -1,303 +0,0 @@
-// (c) eAthena Dev Team - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/core.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/mapindex.h"
-#include "../common/utils.h"
-
-#include "../char/char.h"
-#include "../char/int_storage.h"
-#include "../char/int_pet.h"
-#include "../char/int_party.h"
-#include "../char/int_guild.h"
-#include "../char/inter.h"
-
-#include "../char_sql/char.h"
-#include "../char_sql/int_storage.h"
-#include "../char_sql/int_pet.h"
-#include "../char_sql/int_party.h"
-#include "../char_sql/int_guild.h"
-#include "../char_sql/inter.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHAR_CONF_NAME "conf/char_athena.conf"
-#define SQL_CONF_NAME "conf/inter_athena.conf"
-#define INTER_CONF_NAME "conf/inter_athena.conf"
-//--------------------------------------------------------
-
-int convert_init(void)
-{
- char line[65536];
- int ret;
- int tmp_int[2], lineno, count;
- char input;
- FILE *fp;
-
- ShowWarning("Make sure you backup your databases before continuing!\n");
- ShowMessage("\n");
-
- ShowNotice("Do you wish to convert your Character Database to SQL? (y/n) : ");
- input = getchar();
- if(input == 'y' || input == 'Y')
- {
- struct character_data char_dat;
- struct accreg reg;
-
- ShowStatus("Converting Character Database...\n");
- if( (fp = fopen(char_txt, "r")) == NULL )
- {
- ShowError("Unable to open file [%s]!\n", char_txt);
- return 0;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset(&char_dat, 0, sizeof(struct character_data));
- ret=mmo_char_fromstr(line, &char_dat.status, char_dat.global, &char_dat.global_num);
- if(ret > 0) {
- count++;
- parse_friend_txt(&char_dat.status); //Retrieve friends.
- mmo_char_tosql(char_dat.status.char_id , &char_dat.status);
-
- memset(&reg, 0, sizeof(reg));
- reg.account_id = char_dat.status.account_id;
- reg.char_id = char_dat.status.char_id;
- reg.reg_num = char_dat.global_num;
- memcpy(&reg.reg, &char_dat.global, reg.reg_num*sizeof(struct global_reg));
- inter_accreg_tosql(reg.account_id, reg.char_id, &reg, 3); //Type 3: Character regs
- } else {
- ShowError("Error %d converting character line [%s] (at %s:%d).\n", ret, line, char_txt, lineno);
- }
- }
- ShowStatus("Converted %d characters.\n", count);
- fclose(fp);
- ShowStatus("Converting Account variables Database...\n");
- if( (fp = fopen(accreg_txt, "r")) == NULL )
- {
- ShowError("Unable to open file %s!", accreg_txt);
- return 1;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset (&reg, 0, sizeof(struct accreg));
- if(inter_accreg_fromstr(line, &reg) == 0 && reg.account_id > 0) {
- count++;
- inter_accreg_tosql(reg.account_id, 0, &reg, 2); //Type 2: Account regs
- } else {
- ShowError("accreg reading: broken data [%s] at %s:%d\n", line, accreg_txt, lineno);
- }
- }
- ShowStatus("Converted %d account registries.\n", count);
- fclose(fp);
- }
-
- while(getchar() != '\n');
- ShowMessage("\n");
- ShowNotice("Do you wish to convert your Storage Database to SQL? (y/n) : ");
- input = getchar();
- if(input == 'y' || input == 'Y')
- {
- struct storage_data storage;
- ShowMessage("\n");
- ShowStatus("Converting Storage Database...\n");
- if( (fp = fopen(storage_txt,"r")) == NULL )
- {
- ShowError("can't read : %s\n", storage_txt);
- return 0;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- int account_id;
-
- lineno++;
- if( sscanf(line,"%d,%d",&tmp_int[0],&tmp_int[1]) != 2 )
- continue;
-
- memset(&storage, 0, sizeof(struct storage_data));
- if( storage_fromstr(line,&account_id,&storage) )
- {
- count++;
- storage_tosql(account_id,&storage); //to sql. (dump)
- } else
- ShowError("Error parsing storage line [%s] (at %s:%d)\n", line, storage_txt, lineno);
- }
- ShowStatus("Converted %d storages.\n", count);
- fclose(fp);
- }
-
- //FIXME: CONVERT STATUS DATA HERE!!!
-
- while(getchar() != '\n');
- ShowMessage("\n");
- ShowNotice("Do you wish to convert your Pet Database to SQL? (y/n) : ");
- input=getchar();
- if(input == 'y' || input == 'Y')
- {
- struct s_pet p;
- ShowMessage("\n");
- ShowStatus("Converting Pet Database...\n");
- if( (fp = fopen(pet_txt, "r")) == NULL )
- {
- ShowError("Unable to open file %s!", pet_txt);
- return 1;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset (&p, 0, sizeof(struct s_pet));
- if(inter_pet_fromstr(line, &p)==0 && p.pet_id>0) {
- count++;
- inter_pet_tosql(p.pet_id,&p);
- } else {
- ShowError("pet reading: broken data [%s] at %s:%d\n", line, pet_txt, lineno);
- }
- }
- ShowStatus("Converted %d pets.\n", count);
- fclose(fp);
- }
-
- //FIXME: CONVERT HOMUNCULUS DATA AND SKILLS HERE!!!
-
- while(getchar() != '\n');
- ShowMessage("\n");
- ShowNotice("Do you wish to convert your Party Database to SQL? (y/n) : ");
- input=getchar();
- if(input == 'y' || input == 'Y')
- {
- struct party p;
- ShowMessage("\n");
- ShowStatus("Converting Party Database...\n");
- if( (fp = fopen(party_txt, "r")) == NULL )
- {
- ShowError("Unable to open file %s!", party_txt);
- return 1;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset (&p, 0, sizeof(struct party));
- if(inter_party_fromstr(line, &p) == 0 &&
- p.party_id > 0 &&
- inter_party_tosql(&p, PS_CREATE, 0))
- count++;
- else{
- ShowError("party reading: broken data [%s] at %s:%d\n", line, pet_txt, lineno);
- }
- }
- ShowStatus("Converted %d parties.\n", count);
- fclose(fp);
- }
-
- while(getchar() != '\n');
- ShowMessage("\n");
- ShowNotice("Do you wish to convert your Guilds and Castles Database to SQL? (y/n) : ");
- input=getchar();
- if(input == 'y' || input == 'Y')
- {
- struct guild g;
- struct guild_castle gc;
- ShowMessage("\n");
- ShowStatus("Converting Guild Database...\n");
- if( (fp = fopen(guild_txt, "r")) == NULL )
- {
- ShowError("Unable to open file %s!", guild_txt);
- return 1;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset (&g, 0, sizeof(struct guild));
- if (inter_guild_fromstr(line, &g) == 0 &&
- g.guild_id > 0 &&
- inter_guild_tosql(&g,GS_MASK))
- count++;
- else
- ShowError("guild reading: broken data [%s] at %s:%d\n", line, guild_txt, lineno);
- }
- ShowStatus("Converted %d guilds.\n", count);
- fclose(fp);
- ShowStatus("Converting Guild Castles Database...\n");
- if( (fp = fopen(castle_txt, "r")) == NULL )
- {
- ShowError("Unable to open file %s!", castle_txt);
- return 1;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset(&gc, 0, sizeof(struct guild_castle));
- if (inter_guildcastle_fromstr(line, &gc) == 0) {
- inter_guildcastle_tosql(&gc);
- count++;
- }
- else
- ShowError("guild castle reading: broken data [%s] at %s:%d\n", line, castle_txt, lineno);
- }
- ShowStatus("Converted %d guild castles.\n", count);
- fclose(fp);
- }
-
- while(getchar() != '\n');
- ShowMessage("\n");
- ShowNotice("Do you wish to convert your Guild Storage Database to SQL? (y/n) : ");
- input=getchar();
- if(input == 'y' || input == 'Y')
- {
- struct guild_storage storage_;
- ShowMessage("\n");
- ShowStatus("Converting Guild Storage Database...\n");
- if( (fp = fopen(guild_storage_txt, "r")) == NULL )
- {
- ShowError("can't read : %s\n", guild_storage_txt);
- return 0;
- }
- lineno = count = 0;
- while(fgets(line, sizeof(line), fp))
- {
- lineno++;
- memset(&storage_, 0, sizeof(struct guild_storage));
- if (sscanf(line,"%d",&storage_.guild_id) == 1 &&
- storage_.guild_id > 0 &&
- guild_storage_fromstr(line,&storage_) == 0
- ) {
- count++;
- guild_storage_tosql(storage_.guild_id, &storage_);
- } else
- ShowError("Error parsing guild storage line [%s] (at %s:%d)\n", line, guild_storage_txt, lineno);
- }
- ShowStatus("Converted %d guild storages.\n", count);
- fclose(fp);
- }
-
- return 0;
-}
-
-int do_init(int argc, char** argv)
-{
- char_config_read( (argc > 1) ? argv[1] : CHAR_CONF_NAME);
- mapindex_init();
- sql_config_read( (argc > 2) ? argv[2] : SQL_CONF_NAME);
- inter_init_txt( (argc > 3) ? argv[3] : INTER_CONF_NAME);
- inter_init_sql( (argc > 3) ? argv[3] : INTER_CONF_NAME);
- convert_init();
- ShowStatus("Everything's been converted!\n");
- mapindex_final();
- return 0;
-}
-
-void do_final(void) {}
diff --git a/src/txt-converter/char/CMakeLists.txt b/src/txt-converter/char/CMakeLists.txt
deleted file mode 100644
index ad3970d77..000000000
--- a/src/txt-converter/char/CMakeLists.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-
-#
-# char-converter
-#
-if( BUILD_CONVERTERS )
-message( STATUS "Creating target char-converter" )
-set( COMMON_HEADERS
- ${COMMON_MINI_HEADERS}
- "${COMMON_SOURCE_DIR}/mapindex.h"
- "${COMMON_SOURCE_DIR}/sql.h"
- "${COMMON_SOURCE_DIR}/timer.h"
- )
-set( COMMON_SOURCES
- ${COMMON_MINI_SOURCES}
- "${COMMON_SOURCE_DIR}/mapindex.c"
- "${COMMON_SOURCE_DIR}/sql.c"
- "${COMMON_SOURCE_DIR}/timer.c"
- )
-set( TXT_HEADERS
- "${TXT_CHAR_SOURCE_DIR}/char.h"
- "${TXT_CHAR_SOURCE_DIR}/int_pet.h"
- "${TXT_CHAR_SOURCE_DIR}/int_storage.h"
- "${TXT_CHAR_SOURCE_DIR}/inter.h"
- "${TXT_CHAR_SOURCE_DIR}/int_party.h"
- "${TXT_CHAR_SOURCE_DIR}/int_guild.h"
- )
-set( TXT_SOURCES
- "${TXT_CHAR_SOURCE_DIR}/char.c"
- "${TXT_CHAR_SOURCE_DIR}/int_pet.c"
- "${TXT_CHAR_SOURCE_DIR}/int_storage.c"
- "${TXT_CHAR_SOURCE_DIR}/inter.c"
- "${TXT_CHAR_SOURCE_DIR}/int_party.c"
- "${TXT_CHAR_SOURCE_DIR}/int_guild.c"
- )
-set( SQL_HEADERS
- "${SQL_CHAR_SOURCE_DIR}/char.h"
- "${SQL_CHAR_SOURCE_DIR}/int_pet.h"
- "${SQL_CHAR_SOURCE_DIR}/int_storage.h"
- "${SQL_CHAR_SOURCE_DIR}/inter.h"
- "${SQL_CHAR_SOURCE_DIR}/int_party.h"
- "${SQL_CHAR_SOURCE_DIR}/int_guild.h"
- "${SQL_CHAR_SOURCE_DIR}/int_mercenary.h"
- )
-set( SQL_SOURCES
- "${SQL_CHAR_SOURCE_DIR}/char.c"
- "${SQL_CHAR_SOURCE_DIR}/int_pet.c"
- "${SQL_CHAR_SOURCE_DIR}/int_storage.c"
- "${SQL_CHAR_SOURCE_DIR}/inter.c"
- "${SQL_CHAR_SOURCE_DIR}/int_party.c"
- "${SQL_CHAR_SOURCE_DIR}/int_guild.c"
- "${SQL_CHAR_SOURCE_DIR}/int_mercenary.c"
- )
-set( CONVERTER_SOURCES
- "${CONVERTER_SOURCE_DIR}/char-converter.c"
- )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS} -DTXT_SQL_CONVERT" )
-set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${TXT_HEADERS} ${TXT_SOURCES} ${SQL_HEADERS} ${SQL_SOURCES} ${CONVERTER_SOURCES} )
-source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )
-source_group( txt FILES ${TXT_HEADERS} ${TXT_SOURCES} )
-source_group( sql FILES ${SQL_HEADERS} ${SQL_SOURCES} )
-source_group( converter FILES ${CONVERTER_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_executable( char-converter ${SOURCE_FILES} )
-target_link_libraries( char-converter ${LIBRARIES} )
-set_target_properties( char-converter PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_charconverter DESCRIPTION "char-converter" DISPLAY_NAME "char-converter" GROUP Runtime )
- install( TARGETS char-converter
- DESTINATION "tools"
- COMPONENT Runtime_charconverter )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} char-converter CACHE INTERNAL "" )
-message( STATUS "Creating target char-converter - done" )
-endif( BUILD_CONVERTERS )
diff --git a/src/txt-converter/login-converter.c b/src/txt-converter/login-converter.c
deleted file mode 100644
index d72d35ae2..000000000
--- a/src/txt-converter/login-converter.c
+++ /dev/null
@@ -1,108 +0,0 @@
-// (c) eAthena Dev Team - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h" // struct mmo_account
-#include "../common/core.h"
-#include "../common/showmsg.h"
-#include "../login/account.h"
-#include <stdio.h>
-#include <string.h>
-
-#define LOGIN_CONF_NAME "conf/login_athena.conf"
-
-AccountDB* txtdb = NULL;
-AccountDB* sqldb = NULL;
-
-//--------------------------------------------------------
-
-int convert_login(void)
-{
- AccountDBIterator* iter;
- struct mmo_account acc;
-
- if( !txtdb->init(txtdb) || !sqldb->init(sqldb) )
- {
- ShowFatalError("Initialization failed, unable to start conversion.\n");
- return 0;
- }
-
- ShowStatus("Conversion started...\n");
- //TODO: do some counting & statistics
-
- iter = txtdb->iterator(txtdb);
- while( iter->next(iter, &acc) )
- {
- ShowInfo("Converting user (id: %d, name: %s, gm level: %d)...", acc.account_id, acc.userid, acc.level);
- if( sqldb->create(sqldb, &acc) )
- ShowMessage(CL_GREEN "success.\n");
- else
- ShowMessage(CL_RED "failed!\n");
- }
- iter->destroy(iter);
-
- ShowStatus("Conversion finished.\n");
-
- return 0;
-}
-
-int login_config_read(const char* cfgName)
-{
- int i;
- char line[1024], w1[1024], w2[1024];
- FILE *fp;
-
- ShowStatus("Start reading login server configuration: %s\n", cfgName);
-
- fp=fopen(cfgName,"r");
- if(fp==NULL){
- ShowError("File not found: %s\n", cfgName);
- return 1;
- }
-
- while(fgets(line, sizeof(line), fp))
- {
- if(line[0] == '/' && line[1] == '/')
- continue;
-
- i=sscanf(line,"%[^:]:%s", w1, w2);
- if(i!=2)
- continue;
-
- txtdb->set_property(txtdb, w1, w2);
- sqldb->set_property(sqldb, w1, w2);
-
- //support the import command, just like any other config
- if( strcmpi(w1,"import") == 0 )
- login_config_read(w2);
- }
-
- fclose(fp);
- ShowStatus("End reading login server configuration...\n");
- return 0;
-}
-
-int do_init(int argc, char** argv)
-{
- int input;
-
- txtdb = account_db_txt();
- sqldb = account_db_sql();
-
- login_config_read( (argc > 1) ? argv[1] : LOGIN_CONF_NAME );
-
- ShowInfo("\nWarning : Make sure you backup your databases before continuing!\n");
- ShowInfo("\nDo you wish to convert your Login Database to SQL? (y/n) : ");
- input = getchar();
-
- if(input == 'y' || input == 'Y')
- convert_login();
-
- return 0;
-}
-
-void do_final(void)
-{
- txtdb->destroy(txtdb);
- sqldb->destroy(sqldb);
-}
diff --git a/src/txt-converter/login/CMakeLists.txt b/src/txt-converter/login/CMakeLists.txt
deleted file mode 100644
index 605050d60..000000000
--- a/src/txt-converter/login/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-
-#
-# login-converter
-#
-if( BUILD_CONVERTERS )
-message( STATUS "Creating target login-converter" )
-set( COMMON_HEADERS
- ${COMMON_MINI_HEADERS}
- "${COMMON_SOURCE_DIR}/db.h"
- "${COMMON_SOURCE_DIR}/ers.h"
- "${COMMON_SOURCE_DIR}/lock.h"
- "${COMMON_SOURCE_DIR}/sql.h"
- "${COMMON_SOURCE_DIR}/timer.h"
- "${COMMON_SOURCE_DIR}/utils.h"
- )
-set( COMMON_SOURCES
- ${COMMON_MINI_SOURCES}
- "${COMMON_SOURCE_DIR}/db.c"
- "${COMMON_SOURCE_DIR}/ers.c"
- "${COMMON_SOURCE_DIR}/lock.c"
- "${COMMON_SOURCE_DIR}/sql.c"
- "${COMMON_SOURCE_DIR}/timer.c"
- "${COMMON_SOURCE_DIR}/utils.c"
- )
-set( TXT_HEADERS
- "${TXT_LOGIN_SOURCE_DIR}/account.h"
- )
-set( TXT_SOURCES
- "${TXT_LOGIN_SOURCE_DIR}/account_txt.c"
- )
-set( SQL_HEADERS
- "${SQL_LOGIN_SOURCE_DIR}/account.h"
- )
-set( SQL_SOURCES
- "${SQL_LOGIN_SOURCE_DIR}/account_sql.c"
- )
-set( CONVERTER_SOURCES
- "${CONVERTER_SOURCE_DIR}/login-converter.c"
- )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS} -DWITH_TXT -DWITH_SQL" )
-set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${TXT_HEADERS} ${TXT_SOURCES} ${SQL_HEADERS} ${SQL_SOURCES} ${CONVERTER_SOURCES} )
-source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )
-source_group( txt FILES ${TXT_HEADERS} ${TXT_SOURCES} )
-source_group( sql FILES ${SQL_HEADERS} ${SQL_SOURCES} )
-source_group( converter FILES ${CONVERTER_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_executable( login-converter ${SOURCE_FILES} )
-target_link_libraries( login-converter ${LIBRARIES} )
-set_target_properties( login-converter PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_loginconverter DESCRIPTION "login-converter" DISPLAY_NAME "login-converter" GROUP Runtime )
- install( TARGETS login-converter
- DESTINATION "tools"
- COMPONENT Runtime_loginconverter )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} login-converter CACHE INTERNAL "" )
-message( STATUS "Creating target login-converter - done" )
-endif( BUILD_CONVERTERS )