You could save a global property just before calling Shutdown(). Then, in start.src that property is read, and if it returns error (unset property), you know POL crashed. If property exists, you have to erase it.
As far as I know, CTRL+C is reserved command and thus you cannot manipulate its actions. You could however create a script shutdownalias.src into scripts/console/, add a command, say, CTRL+X, and use that instead of hardcoded shutdown.
Scriptwise the whole setting would look like this.
A new line to /config/console.cfg
Code: Select all
CMD ^X shutdownalias Forces shutdown.
/scripts/console/shutdownalias.src
Code: Select all
use uo;
program shutdownalias( )
SetGlobalProperty("CleanShutdown", 1);
Shutdown();
endprogram
A new line to /scripts/start.src
Code: Select all
// Inside the program block...
if (GetGlobalProperty("CleanShutdown"))
Print("POL did not crash.");
EraseGlobalProperty("CleanShutdown");
else
Print("POL crashed!");
endif
And before every other Shutdown() function call..
Code: Select all
SetGlobalProperty("CleanShutdown", 1);
I do not use this myself, and thus cannot guarantee that it would work for sure. Anyhow this should give you an idea.