From 6009f91efd3dfd57122d2cf98d7255ec99ba8475 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 20 Aug 2017 14:49:10 +0200 Subject: 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. --- src/Plugin/Help.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Plugin/Help.hs') 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" -- cgit v1.2.3