diff options
author | Teddy Wing | 2017-08-20 14:49:10 +0200 |
---|---|---|
committer | Teddy Wing | 2017-08-20 15:15:15 +0200 |
commit | 6009f91efd3dfd57122d2cf98d7255ec99ba8475 (patch) | |
tree | a90910db88a04b259e796090481c9db6e8b3d311 /src/Plugin/Help.hs | |
parent | 5d01ba1990e99785b947c2aca71367ea5b21dce2 (diff) | |
download | sorbot-6009f91efd3dfd57122d2cf98d7255ec99ba8475.tar.bz2 |
Plugin: Add `queryOnly` field
A new field that says whether this plugin should only respond via a
private query message to the user instead of responding on the channel
the message was sent from.
This is needed for the Help plugin, which shouldn't flood channels with
lots of extraneous output. Instead, the Help plugin should send the list
of commands directly to the user.
Since most of the time we don't want this behaviour, encode a default of
`False` on the field so that most plugins don't have to define it
manually. This necessitates changing the constructors to use the default
`Plugin` instead.
Diffstat (limited to 'src/Plugin/Help.hs')
-rw-r--r-- | src/Plugin/Help.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugin/Help.hs b/src/Plugin/Help.hs index ac38dab..258a80a 100644 --- a/src/Plugin/Help.hs +++ b/src/Plugin/Help.hs @@ -9,7 +9,7 @@ import qualified Data.Text as T import qualified PluginList as PL (plugins) import Plugin.Base -help = Plugin +help = defaultPlugin { matchRegex = "^help$" , perform = helpAction , command = "help" |