summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-09-23 01:16:06 +0200
committerBertram <bertram@cegetel.net>2009-09-23 01:16:06 +0200
commitbb078a181535bea23d8ca4f04ea66c98fc6e3403 (patch)
tree17a5a84fb85cedf02fae04402f6e87832f5915c4 /src/main.cpp
parent46cbe302177a7e3624ae97418b8efa05dc6f8823 (diff)
downloadmana-bb078a181535bea23d8ca4f04ea66c98fc6e3403.tar.gz
mana-bb078a181535bea23d8ca4f04ea66c98fc6e3403.tar.bz2
mana-bb078a181535bea23d8ca4f04ea66c98fc6e3403.tar.xz
mana-bb078a181535bea23d8ca4f04ea66c98fc6e3403.zip
Made the TMWserv client handles the FORCE_QUIT connection state.
I was getting fed up with killing the TMWserv client in order to quit it. The two cases left before having a full working set, is to handle correctly Switch Character and Switch Server in QuitDialog which must have been broken during the clients merge.
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 49444d17..29a1c132 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1334,6 +1334,13 @@ int main(int argc, char *argv[])
case STATE_WAIT:
break;
+ case STATE_FORCE_QUIT:
+ logger->log("State: FORCE_QUIT");
+ state = STATE_EXIT;
+ logoutThenExit();
+ Net::getGeneralHandler()->unload();
+ break;
+
default:
state = STATE_FORCE_QUIT;
break;