You can see what actually comes from the IRC server by typing
/debug @debug and looking what appears in the @debug window when an event you're interested in triggers.
A $null character does not exist and certainly cannot be used to indent text - it is nothing. They use ASCII 32 to indent the text.
A better way of realising when the text is a command would be to set a variable whenever you send the message to chan/nickserve that lists the commands.
For example:
alias listcommands {
if ($status != connected) { return }
set -u10 %chanservecommands $true
msg chanserv help
}
on *:notice:*:?:{
if ($nick == chanserv) && (%chanservecommands) && ($1 isupper) { echo -a command = $1, purpose = $2- }
}
That said, yes, $rawmsg is the best way to retrieve text with spaces intact