client: start reading once :connected has been dispatched
plugin: simplify plugin definition
event: improve the code