MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Server Modification Suggestion
-
Date: Wed, 20 Sep 1995 20:03:03 PDT
-
From: Coolin MacKaarmick <colin@tripod.tripod.com>
-
Content-Type: TEXT/PLAIN; charset=US-ASCII
After browsing the server code, one can see that #0:do_command() (if it
exists) is actually called _before_ the command line verb.
I'd really like a verb (say #0:do_after_command()) that would be called
_after_ the command line verb. This should be easy; just put in another
run_server_task() call in do_command_task() in tasks.c, after the command
is actually executed.
i.e.:
>From tasks.c:
... [from do_command_task()] ...
if (run_server_task(pi.player, SYSTEM_OBJECT, "do_command", args,
command, &result) != OUTCOME_DONE
|| is_true(result)) {
==> So we call #0:do_command() first, and unless it dies or returns a
true value ...
/* Do nothing more; we assume :do_command handled it. */
} else if (p) {
current_task_id = new_task_id();
do_input_task(p, &pi, 0);
==> ... we go ahead and do the task ...
} else
notify(pi.player, "I couldn't understand that.");
==> ... or cry ignorance.
...
==> And here, I would like to put in a second
run_server_task(..."do_after_command"...).
In my case, this would allow me to be able to spit out an list of verbs
available in the player's location, _after_ the output of an issued
command. Anyone see any problems with this? Pavel, any chance of getting
this into the 1.7.9 release?
Colin
############################################################################
#Colin F. McCormick Freelance Programmer -- MOO & Unix specialist#
#colin@tripod.tripod.com http://student_97ffa.williams.edu/~cmccormi#
# GS/Lit/M d? p- c++(---) l+(++) u++ e++ m++(-) s+/ n+ h* f* !g @w++ t+ y? #
############################################################################
Follow-Ups:
Home |
Subject Index |
Thread Index