MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

[SERVER] adding new aliases for commands



>In order to hack together new commands and have them UNIVERSALLY available,
>you'd need to find that appropriate section of the server (and here I regret
>I can't help you) and clone the code to add the command you want.

While I don't recommend actually doing this (mmmh, then why am I telling you
 you about it?) here it is (hope you know C):

In the file parse_cmd.c, there is a function named parse_command.
It looks, in part, like this:

>    while (*command == ' ')
>        command++;
>    switch (*command) {
>      case '"':
>        verb = "say";
>        goto finish_specials;
>      case ':':
>        verb = "emote";
>        goto finish_specials;

So, if you wanted to add the alias ' for page, then you'd add:

>      case '\'':
>        verb = "page";
>        goto finish_specials;

Somewhere in the switch().

Then recompile/remake, then restart.

Again, I don't recommend doing this, it's much easier to do this in-db, via
 Seth's instructions.
  ______                              __
    /   /  Andy Bakun     _/_      / /  `  /)  /)       _/_
 --/   /_  , , , __.  __  /  _  __/ /--   //  //  __,_  /  _
(_/   / /_(_(_/_(_/|_/ (_<__</_(_/ (___, //__//__(_) (_<__/_)_
  How much head could a bonehead bone   />  />
    if a bonehead could bone head?     //  //
  http://tecfa.unige.ch:4243/~tef/    </  </  




Home | Subject Index | Thread Index