diff options
author | Teddy Wing | 2017-11-19 19:22:19 +0100 |
---|---|---|
committer | Teddy Wing | 2017-11-19 19:34:56 +0100 |
commit | 6961ef49cbcb88e4f3466a5852a4cf90d95a587a (patch) | |
tree | a05eca21c0d03407179a141e0289ce15cddfadb7 /src/Plugin/GitRemoteSetOrigin.hs | |
parent | eb732a97b82f9d03f68247d79301ee26b84b650b (diff) | |
download | sorbot-6961ef49cbcb88e4f3466a5852a4cf90d95a587a.tar.bz2 |
Lib: Test application of Bot reader
A test to try to get _something_ to compile. And it does!
Here we try to run a plugin with `runReaderT` and `runBot` to pass
`Options` to the plugin, using the "help" plugin as an example. It feeds
hard-coded `Options` to the plugin and outputs its response to STDOUT.
Also get an implementation of `initializePlugins` working that will
allow us to build a list of plugins with `Options` applied to the
reader.
This commit comments out the whole of IRC.hs in order to get the code to
compile. That file still has a bunch of `Bot` monad-related type errors.
To build the final plugin list, I think what we'll want to do is use
something like `initializePlugins` in Lib to apply all our plugins with
the `Options` and then feed that to `connectIRC`. In order to build the
"help" plugin, the plan is to re-apply the `Options` after `ask`ing for
them inside the `PluginAction` for "help" to all plugins, thus enabling
us to get a plugin list with the applied reader for proper localisation
of the help output.
Diffstat (limited to 'src/Plugin/GitRemoteSetOrigin.hs')
0 files changed, 0 insertions, 0 deletions