aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin/GitRemoteSetOrigin.hs
diff options
context:
space:
mode:
authorTeddy Wing2017-08-20 14:49:10 +0200
committerTeddy Wing2017-08-20 15:15:15 +0200
commit6009f91efd3dfd57122d2cf98d7255ec99ba8475 (patch)
treea90910db88a04b259e796090481c9db6e8b3d311 /src/Plugin/GitRemoteSetOrigin.hs
parent5d01ba1990e99785b947c2aca71367ea5b21dce2 (diff)
downloadsorbot-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/GitRemoteSetOrigin.hs')
-rw-r--r--src/Plugin/GitRemoteSetOrigin.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugin/GitRemoteSetOrigin.hs b/src/Plugin/GitRemoteSetOrigin.hs
index 8ab86dc..0fdb4ef 100644
--- a/src/Plugin/GitRemoteSetOrigin.hs
+++ b/src/Plugin/GitRemoteSetOrigin.hs
@@ -13,7 +13,7 @@ import Text.Regex.TDFA ((=~))
import qualified Message as M
import Plugin.Base
-gitRemoteSetOrigin = Plugin
+gitRemoteSetOrigin = defaultPlugin
{ matchRegex = "^git remote set origin ([^ ]+)$"
, perform = gitRemoteSetOriginAction
, command = "git remote set origin <url>"