Lots of changes.

Because I have been bad with git and don't feel like trying to
break this up properly into a ton of commits...

Added features:

scan support
friend support
kickban

Fixes:

Various crashes.