Core/actions: Make privmsg() work with target=None.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit 34583e41e1d469490f66a391343e8ae7048fc9cb)