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

Re: [pbmserv-dev] Adding a command to a game



Okay. Finally got back to this, and it's almost ready to go. Just one thing is missing: how to make the output go through sendmail. I just realized my output is only printing, but not going through sendmail. I tried borrowing mailopen() from pbmcmds.c, but it seems I have to keep borrowing more and more.

Lyman Hurd wrote:

In your yourgamenamehere.h file (go.h?):

virtual int UnknownCommand(int argc, char **argv);

Here's what my routine does.  You'd be looking for
"sgf" instead of "set".  Return 0 on success, and if
the compare does not work be sure to return to the
default behavior.  I'd probably keep this routine to
about 10 lines just to see if the command was sgf and
defer the guts to its own method!