Add away, online and dnd commands.

Based on a larger patch by Peter Stuge.