rlgwebd.js: read commands from the console

The RLG-Web server can now be controlled with commands sent to stdin.
Currently, the only one implemented is "quit".  Some improvements to
the shutdown process were also made.
This commit is contained in:
John "Elwin" Edwards 2012-06-04 14:21:41 -07:00
parent 8599ec081d
commit d0e3b1da2f
2 changed files with 44 additions and 8 deletions

View file

@ -132,7 +132,7 @@ function processMsg(msg) {
if (!msgDict.t)
return null;
else if (msgDict.t == "E") {
if (msgDict.c == 1) {
if (msgDict.c == 1 || msgDict.c == 6) {
logout();
}
debug(1, "Server error: " + msgDict.s);