Plugins (C#)
These pages are for writing a plugin: a C# class that adds a part of Tilde, such as a mail or chat protocol. Every protocol of Tilde is a plugin, and so are OpenPGP, the mail cache, the Lua scripts and the rules. A plugin is trusted code compiled into tcli and tt, with no sandbox. Start with the plugin class, then read the page of what your plugin adds. The examples come from the mbox plugin in plugins/Tilde.Plugin.Mail.Mbox, a small read only mail store, and the full reference of each interface is the XML documentation in its source file.
| Page | What it answers |
|---|---|
| The plugin class | What does a plugin look like, how does Tilde order and start it, and what is the plugin API version? |
| A mail plugin | How do I add a mail store or a mail transport, and how do I change what they do with a middleware? |
| A chat plugin | How do I add a chat network, and how do its events reach Tilde? |
| Configuration sections | How does a plugin read its own table of config.toml, and the settings of an account? |
| Commands, Lua modules and events | How does a plugin add a command, a Lua module or an event for the scripts? |
| Test a plugin | How do I test a plugin with unit tests and against a real server in Docker? |