summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/char_sql/char.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index e47031633..7f53464ac 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/24
+ * Added logging of deleted characters when the char_log is enabled.
+ [Skotlex]
* Fixed skill_delayfix not altering delay at all after you reached 150.
[Skotlex]
* Applied ers to pet loot drops and cleaned up the pet loot drop function.
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)) {