hedgewars/uCommandHandlers.pas
branch0.9.15
changeset 4751 849740a91d36
parent 4746 3ae448aebe7e
child 4845 9a0f5377c529
--- a/hedgewars/uCommandHandlers.pas	Sat Jan 15 21:00:45 2011 +0100
+++ b/hedgewars/uCommandHandlers.pas	Sat Jan 15 21:32:44 2011 +0100
@@ -23,35 +23,35 @@
 procedure chQuit(var s: shortstring);
 const prevGState: TGameState = gsConfirm;
 begin
-s:= s; // avoid compiler hint
-if GameState <> gsConfirm then
-        begin
+    s:= s; // avoid compiler hint
+    if GameState <> gsConfirm then
+    begin
         prevGState:= GameState;
         GameState:= gsConfirm
-        end else
-        GameState:= prevGState
+    end else
+    GameState:= prevGState
 end;
 
 procedure chForceQuit(var s: shortstring);
 begin
     s:= s; // avoid compiler hint
-    SendIPC('Q');
-    GameState:= gsExit
+    GameState:= gsConfirm;
+    ParseCommand('confirm', true);
 end;
 
 procedure chConfirm(var s: shortstring);
 begin
-s:= s; // avoid compiler hint
-if GameState = gsConfirm then
+    s:= s; // avoid compiler hint
+    if GameState = gsConfirm then
     begin
-    SendIPC('Q');
-    GameState:= gsExit
+        SendIPC('Q');
+        GameState:= gsExit
     end
 else
     ParseCommand('chat team', true);
 end;
 
-procedure chShutdown (var s: shortstring);
+procedure chHalt (var s: shortstring);
 begin
     s:= s; // avoid compiler hint
     SendIPC('H');
@@ -598,7 +598,7 @@
     RegisterVariable('quit'    , vtCommand, @chQuit         , true );
     RegisterVariable('forcequit', vtCommand, @chForceQuit   , true );
     RegisterVariable('confirm' , vtCommand, @chConfirm      , true );
-    RegisterVariable('shutdown', vtCommand, @chShutdown     , true );
+    RegisterVariable('halt',     vtCommand, @chHalt         , true );
     RegisterVariable('+speedup', vtCommand, @chSpeedup_p    , true );
     RegisterVariable('-speedup', vtCommand, @chSpeedup_m    , true );
     RegisterVariable('zoomin'  , vtCommand, @chZoomIn       , true );