summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-24 15:55:04 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-24 15:55:04 +0000
commitf753f361a3fabcb9b14746ead47dac7e9a0d8ab7 (patch)
tree737978a5b45148e2ec2dce282c4208081e321b81 /src/char_sql
parentdc9ae7b5a2a047d3cf3e889b0d1df0d7af67e2a4 (diff)
downloadhercules-f753f361a3fabcb9b14746ead47dac7e9a0d8ab7.tar.gz
hercules-f753f361a3fabcb9b14746ead47dac7e9a0d8ab7.tar.bz2
hercules-f753f361a3fabcb9b14746ead47dac7e9a0d8ab7.tar.xz
hercules-f753f361a3fabcb9b14746ead47dac7e9a0d8ab7.zip
- Added logging of deleted characters when the char_log is enabled.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6251 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 3690ae43a..a4fafc263 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -1587,6 +1587,16 @@ int delete_char_sql(int char_id, int partner_id)
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
+ if (log_char) {
+ sprintf(tmp_sql,"INSERT INTO `%s`(`time`, `account_id`,`char_num`,`char_msg`,`name`) VALUES (NOW(), '%d', '%d', 'Deleted char (CID %d)', '%s')",
+ charlog_db, account_id, 0, char_id, t_name);
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
/* delete character */
sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",char_db, char_id);
if(mysql_query(&mysql_handle, tmp_sql)) {