summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt4
-rw-r--r--src/char_sql/char.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 1a9fffea2..e29af9d08 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,10 @@
Date Added
02/05
+ * Changed the way char deletion works for SQL [1051: Ajarn]
+ - If the email the client fails check then check if the
+ email is blank and the DB email is a@a.com (default)
+ If so, assume it was created with _M/_F, and delete it
* SQL Login accepts _M/_F now [Credit to Sirius] [1049: Ajarn]
* Map server now actually reads bind_ip [1048: Ajarn]
Side note: login reads bind_ip, but doesn't use login_ip now.
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index a6c8d60b3..3e144cf40 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2601,7 +2601,10 @@ int parse_char(int fd) {
sql_res = mysql_store_result(&lmysql_handle);
if (sql_res) {
sql_row = mysql_fetch_row(sql_res);
- if (strcmp(email,sql_row[0]) == 0) {
+
+ if ( (strcmp(email,sql_row[0]) == 0) || // client_value == db_value?
+ ((strcmp(email,"") == 0) &&
+ (strcmp(sql_row[0],"a@a.com") == 0)) ) { // client_value == "" && db_value == "a@a.com" ?
mysql_free_result(sql_res);
} else {
WFIFOW(fd, 0) = 0x70;