summaryrefslogtreecommitdiff
path: root/src/account-server/accounthandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2008-04-18 23:33:24 +0000
committerYohann Ferreira <bertram@cegetel.net>2008-04-18 23:33:24 +0000
commit8d95e9c4e5e919964e02391696b1371110f8fdfd (patch)
treed2685995e4f216a8bdeffb69c3e9829e274a1712 /src/account-server/accounthandler.cpp
parent177ddcafa1daaa6178a5e15786b8a24aeea6ec6b (diff)
downloadmanaserv-8d95e9c4e5e919964e02391696b1371110f8fdfd.tar.gz
manaserv-8d95e9c4e5e919964e02391696b1371110f8fdfd.tar.bz2
manaserv-8d95e9c4e5e919964e02391696b1371110f8fdfd.tar.xz
manaserv-8d95e9c4e5e919964e02391696b1371110f8fdfd.zip
Fixed 'Password changes' and 'Unregistering'.
Diffstat (limited to 'src/account-server/accounthandler.cpp')
-rw-r--r--src/account-server/accounthandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp
index 50e9456e..dba3ca14 100644
--- a/src/account-server/accounthandler.cpp
+++ b/src/account-server/accounthandler.cpp
@@ -344,7 +344,7 @@ static void handleUnregisterMessage(AccountClient &computer, MessageIn &msg)
MessageOut reply(APMSG_UNREGISTER_RESPONSE);
- if (computer.status != CLIENT_LOGIN)
+ if (computer.status != CLIENT_CONNECTED)
{
reply.writeByte(ERRMSG_FAILURE);
computer.send(reply);
@@ -407,6 +407,8 @@ static void handleEmailChangeMessage(AccountClient &computer, MessageIn &msg)
else
{
acc->setEmail(email);
+ // Keep the database up to date otherwise we will go out of sync
+ storage->flush(acc);
reply.writeByte(ERRMSG_OK);
}
computer.send(reply);
@@ -458,6 +460,8 @@ static void handlePasswordChangeMessage(AccountClient &computer, MessageIn &msg)
else
{
acc->setPassword(newPassword);
+ // Keep the database up to date otherwise we will go out of sync
+ storage->flush(acc);
reply.writeByte(ERRMSG_OK);
}