Don't ping when weechat.el isn't connected.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>