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/GitHubCommit.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Plugin/GitHubCommit.hs') diff --git a/src/Plugin/GitHubCommit.hs b/src/Plugin/GitHubCommit.hs index c10abf6..3d2e490 100644 --- a/src/Plugin/GitHubCommit.hs +++ b/src/Plugin/GitHubCommit.hs @@ -14,7 +14,7 @@ import I18n import qualified Message as M import Plugin.Base -gitHubCommit = Plugin +gitHubCommit = defaultPlugin { matchRegex = "^[0-9a-f]{40}$" , perform = gitHubCommitAction , command = "" -- cgit v1.2.3