use buffer passed by callback (buf argument required)

when a user types in a command, the associated buffer is not necessarily
the same as returned by weechat.current_buffer (e.g. relay client)

this is an alternative to PR #42