diff options
author | Haru <haru@dotalux.com> | 2013-09-22 09:56:48 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-09-22 09:56:48 +0200 |
commit | 469102135fd5429a4225afe378bed3e82dc81d31 (patch) | |
tree | 281e2f661c9affe3870669b4faceb173c96e674f /src/char/char.c | |
parent | beaf3a26a60d5b0429a577b7d58232957d4483e7 (diff) | |
download | hercules-469102135fd5429a4225afe378bed3e82dc81d31.tar.gz hercules-469102135fd5429a4225afe378bed3e82dc81d31.tar.bz2 hercules-469102135fd5429a4225afe378bed3e82dc81d31.tar.xz hercules-469102135fd5429a4225afe378bed3e82dc81d31.zip |
Corrected various hardcoded database table names
- Added an elemental_db setting to inter-server.conf (elemental table)
- Switched an instance of hardcoded `ipbanlist` to use the ipban_table
setting; thanks to Takkun, related to issue #135
- Switched two instances of hardcoded `char` to use the char_db setting
- Added a TODO notice about the usage of the login table (on a side
note, hardcoded) from the login server (related to issue #142)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c index dc7966e8d..cbc987f0d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -68,6 +68,7 @@ char skill_homunculus_db[256] = "skill_homunculus"; char mercenary_db[256] = "mercenary"; char mercenary_owner_db[256] = "mercenary_owner"; char ragsrvinfo_db[256] = "ragsrvinfo"; +char elemental_db[256] = "elemental"; char interreg_db[32] = "interreg"; // show loading/saving messages @@ -2819,7 +2820,8 @@ int parse_frommap(int fd) int aid, cid; aid = RFIFOL(fd,2); cid = RFIFOL(fd,6); - if( SQL_ERROR == SQL->Query(sql_handle, "SELECT type, tick, val1, val2, val3, val4 from `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", + if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `type`, `tick`, `val1`, `val2`, `val3`, `val4` " + "FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, aid, cid) ) { Sql_ShowDebug(sql_handle); @@ -4715,6 +4717,8 @@ void sql_config_read(const char* cfgName) safestrncpy(mercenary_owner_db,w2,sizeof(mercenary_owner_db)); else if(!strcmpi(w1,"ragsrvinfo_db")) safestrncpy(ragsrvinfo_db,w2,sizeof(ragsrvinfo_db)); + else if(!strcmpi(w1,"elemental_db")) + safestrncpy(elemental_db,w2,sizeof(elemental_db)); else if(!strcmpi(w1,"interreg_db")) safestrncpy(interreg_db,w2,sizeof(interreg_db)); //support the import command, just like any other config |