I've rewritten my managesieve patch using plugin api and I've found a few issues:
and it's possible now, but... images path is hardcoded to "plugins/plugin_name/...", and will not work if someone will change plugins_dir.
That's ok, but there's a one situation when it's a problem.
For 'html' output I must write: $this->rc->output->add_script(sprintf("rcmail.managesieve_updatelist('%s', '%s', %d);", isset($new) ? 'add' : 'update', $this->form['name'], $fid), 'foot'); instead of more unified form: $this->rc->output->command('managesieve_updatelist', isset($new) ? 'add' : 'update', $this->form['name'], $fid);
Creating plugins translator will be simpler then.