diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-04 21:04:31 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-04 21:04:31 +0000 |
commit | 961e0182515f609174791ed1ae0bf99eb50c5dfc (patch) | |
tree | ce346bc30482d346cb467e7debe6562b1120afcb /src | |
parent | 74382866b1dc40a990f6dcc164fac8eb4d3e5a46 (diff) | |
download | hercules-961e0182515f609174791ed1ae0bf99eb50c5dfc.tar.gz hercules-961e0182515f609174791ed1ae0bf99eb50c5dfc.tar.bz2 hercules-961e0182515f609174791ed1ae0bf99eb50c5dfc.tar.xz hercules-961e0182515f609174791ed1ae0bf99eb50c5dfc.zip |
Fixed a mistake in r10919 messing up logged values (bugreport:167)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11357 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/log.c b/src/map/log.c index 5c061b90f..97a802a0c 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -70,7 +70,7 @@ int log_branch(struct map_session_data *sd) { SqlStmt* stmt; stmt = SqlStmt_Malloc(logmysql_handle); - if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`branch_date`, `account_id`, `char_id`, `char_name`, `map`) VALUES (NOW(), '%d', '%d', ?, '%s')", log_config.log_branch_db, sd->status.account_id, sd->status.char_id, sd->status.name, mapindex_id2name(sd->mapindex)) + if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`branch_date`, `account_id`, `char_id`, `char_name`, `map`) VALUES (NOW(), '%d', '%d', ?, '%s')", log_config.log_branch_db, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) ) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) { @@ -296,7 +296,7 @@ int log_atcommand(struct map_session_data* sd, const char* message) } stmt = SqlStmt_Malloc(logmysql_handle); - if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`atcommand_date`, `account_id`, `char_id`, `char_name`, `map`, `command`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", log_config.log_gm_db, sd->status.account_id, sd->status.char_id, sd->status.name, mapindex_id2name(sd->mapindex), message) + if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`atcommand_date`, `account_id`, `char_id`, `char_name`, `map`, `command`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", log_config.log_gm_db, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) ) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, 255)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) @@ -334,7 +334,7 @@ int log_npc(struct map_session_data* sd, const char* message) { SqlStmt* stmt; stmt = SqlStmt_Malloc(logmysql_handle); - if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`npc_date`, `account_id`, `char_id`, `char_name`, `map`, `mes`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", log_config.log_npc_db, sd->status.account_id, sd->status.char_id, sd->status.name, mapindex_id2name(sd->mapindex), message) + if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT DELAYED INTO `%s` (`npc_date`, `account_id`, `char_id`, `char_name`, `map`, `mes`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", log_config.log_npc_db, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) ) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, 255)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) |