Set up pre- and post-command hooks.
[super-star-trek.git] / sst.c
diff --git a/sst.c b/sst.c
index 77fbeb826ba2b4f273df612835c408f13be1827b..ee80b3fc878ba45048deeea559f9aae42f81b366 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -190,6 +190,7 @@ static void makemoves(void) {
                        }\r
                        else prout("UNRECOGNIZED COMMAND.");\r
                }\r
+               commandhook(commands[i], TRUE);\r
                switch (i) { /* command switch */\r
                        case 0:                 // srscan\r
                                srscan(1);\r
@@ -314,6 +315,7 @@ static void makemoves(void) {
                                helpme();       // get help\r
                                break;\r
                }\r
+               commandhook(commands[i], FALSE);\r
                for (;;) {\r
                        if (alldone) break;             // Game has ended\r
 #ifdef DEBUG\r