Fix invite event using wrong parameter
Add join-on-invite from known users
Change command event to take a single string

While apparently limiting, it saves some processing time when you don't
need the string split and the old way of splitting doesn't do enough when you
need to split off more than just the rest of the string after the command.

The former splitting can be done easily using strchr and scanning
forward while more complicated use cases like dstrshlex()ing the string
and putting the results into getopt() are now easy.
Replace superfluous defines and add some rationale
Add prefix splitting helpers