ninjabot: improvements on send process

Encoding as 'unicode-escape' sanitises all secape sequences.
The splicing used works even if the string is shorter than the value.
The string should be 510, not 511 chars.