summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-02-13 15:01:30 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-02-13 15:01:30 +0000
commit932eecc040511455ab031eee0e74eba403a90bfe (patch)
tree0ebe246940cb6a335af54308a59499c6b655b929 /src/main.cpp
parent16ac39b5fe2125d109848d2f4945816857929243 (diff)
downloadmana-932eecc040511455ab031eee0e74eba403a90bfe.tar.gz
mana-932eecc040511455ab031eee0e74eba403a90bfe.tar.bz2
mana-932eecc040511455ab031eee0e74eba403a90bfe.tar.xz
mana-932eecc040511455ab031eee0e74eba403a90bfe.zip
Fixed the _M/_F username bug.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 364b8a61..3e7576aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -421,6 +421,12 @@ void accountLogin(Network *network, LoginData *loginData)
// Clear the password, avoids auto login when returning to login
loginData->password = "";
+ //remove _M or _F from username after a login for registration purpose
+ if (loginData->registerLogin)
+ {
+ loginData->registerLogin = false;
+ loginData->username = loginData->username.substr(0, loginData->username.length() - 2);
+ }
// TODO This is not the best place to save the config, but at least better
// than the login gui window
if (loginData->remember) {
@@ -538,6 +544,7 @@ int main(int argc, char *argv[])
loginData.hostname = config.getValue("host", "server.themanaworld.org");
loginData.port = (short)config.getValue("port", 0);
loginData.remember = config.getValue("remember", 0);
+ loginData.registerLogin = false;
SDLNet_Init();
Network *network = new Network();