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!